dirstate: move special handling of files==['.'] together
I think it makes it a little clearer to have the two conditions for
files==['.'] near each other.
Differential Revision: https://phab.mercurial-scm.org/D6400
--- a/mercurial/dirstate.py Fri May 17 00:57:57 2019 -0700
+++ b/mercurial/dirstate.py Wed Apr 24 09:32:29 2019 -0700
@@ -759,13 +759,14 @@
if not files or '.' in files:
files = ['.']
+ # constructing the foldmap is expensive, so don't do it for the
+ # common case where files is ['.']
+ normalize = None
results = dict.fromkeys(subrepos)
results['.hg'] = None
for ff in files:
- # constructing the foldmap is expensive, so don't do it for the
- # common case where files is ['.']
- if normalize and ff != '.':
+ if normalize:
nf = normalize(ff, False, True)
else:
nf = ff