mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
largefiles: drop unnecessary setting of matcher._always
In two very similar segments of code, an existing matcher is modified by changing its _files attribute through a map and a filter operation. Neither operation can cause an empty list to become non-empty, so a matcher that always matches can not stop always matching. Drop the setting of the attribute, so we don't unnecessarily prevent the fast paths to be taken where these matchers end up being used.
This commit is contained in:
parent
79172c85c8
commit
39c27d779f
@ -576,7 +576,6 @@ def overridecopy(orig, ui, repo, pats, opts, rename=False):
|
||||
lfile = lambda f: lfutil.standin(f) in manifest
|
||||
m._files = [lfutil.standin(f) for f in m._files if lfile(f)]
|
||||
m._fmap = set(m._files)
|
||||
m._always = False
|
||||
origmatchfn = m.matchfn
|
||||
m.matchfn = lambda f: (lfutil.isstandin(f) and
|
||||
(f in manifest) and
|
||||
@ -684,7 +683,6 @@ def overriderevert(orig, ui, repo, *pats, **opts):
|
||||
m._files = [tostandin(f) for f in m._files]
|
||||
m._files = [f for f in m._files if f is not None]
|
||||
m._fmap = set(m._files)
|
||||
m._always = False
|
||||
origmatchfn = m.matchfn
|
||||
def matchfn(f):
|
||||
if lfutil.isstandin(f):
|
||||
|
Loading…
Reference in New Issue
Block a user