##// END OF EJS Templates
largefiles: simplify lfutil.getstandinmatcher by inlining getmatcher
Mads Kiilerich -
r18146:819c7e10 default
parent child Browse files
Show More
@@ -260,18 +260,10 b' def getstandinmatcher(repo, pats=[], opt'
260 pats = [standindir]
260 pats = [standindir]
261 else:
261 else:
262 # no patterns and no standin dir: return matcher that matches nothing
262 # no patterns and no standin dir: return matcher that matches nothing
263 match = match_.match(repo.root, None, [], exact=True)
263 return match_.match(repo.root, None, [], exact=True)
264 match.matchfn = lambda f: False
265 return match
266 return getmatcher(repo, pats, opts, showbad=False)
267
264
268 def getmatcher(repo, pats=[], opts={}, showbad=True):
265 # no warnings about missing files or directories
269 '''Wrapper around scmutil.match() that adds showbad: if false,
270 neuter the match object's bad() method so it does not print any
271 warnings about missing files or directories.'''
272 match = scmutil.match(repo[None], pats, opts)
266 match = scmutil.match(repo[None], pats, opts)
273
274 if not showbad:
275 match.bad = lambda f, msg: None
267 match.bad = lambda f, msg: None
276 return match
268 return match
277
269
General Comments 0
You need to be logged in to leave comments. Login now