largefiles: delete unnecessary meddling with matcher internals
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 17 May 2017 14:31:47 -0700
changeset 32309 16a5cb4eedb7
parent 32308 e8569cc131d1
child 32310 b96be0098624
largefiles: delete unnecessary meddling with matcher internals lfutil.getstandinmatcher() was setting match._always to False because it wanted a matcher of no patterns to match no files and match.match() instead matches everything. However, since ba8089433090 (largefiles: ensure lfutil.getstandinmatcher() only matches standins, 2015-08-12), it never actually passes an empty list of patterns, so the hack has become unnecessary.
hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py	Thu May 04 00:23:09 2017 +0530
+++ b/hgext/largefiles/lfutil.py	Wed May 17 14:31:47 2017 -0700
@@ -296,8 +296,6 @@
         if not pats:
             pats = [wvfs.join(standindir)]
         match = scmutil.match(repo[None], pats, badfn=badfn)
-        # if pats is empty, it would incorrectly always match, so clear _always
-        match._always = False
     else:
         # no patterns: relative to repo root
         match = scmutil.match(repo[None], [wvfs.join(standindir)], badfn=badfn)