# HG changeset patch # User Matt Mackall # Date 1243151774 18000 # Node ID dd46948a07fa489841a001fb3278fa0515a8f06b # Parent 9f12e1a27a1b3b9a5cfea42ea3982b00879607d2 match: kill test in matchfn diff -r 9f12e1a27a1b -r dd46948a07fa mercurial/match.py --- a/mercurial/match.py Sun May 24 02:56:14 2009 -0500 +++ b/mercurial/match.py Sun May 24 02:56:14 2009 -0500 @@ -175,8 +175,6 @@ def matchfn(pats, tail): """build a matching function from a set of patterns""" - if not pats: - return try: pat = '(?:%s)' % '|'.join([regex(k, p, tail) for (k, p) in pats]) if len(pat) > 20000: @@ -233,7 +231,8 @@ roots, pats, anypats = normalizepats(names, dflt_pat) - patmatch = matchfn(pats, '$') + if names: + patmatch = matchfn(pats, '$') if inc: dummy, inckinds, dummy = normalizepats(inc, 'glob') incmatch = matchfn(inckinds, '(?:/|$)')