Mercurial > hg-stable
changeset 25275:d94e403b5237
dirstate: use match.prefix() instead of 'not match.anypats()'
It seems clearer to check for what it is than what it isn't.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 19 May 2015 10:40:40 -0700 |
parents | 144085249c3f |
children | c436ba9d6ac0 |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Tue May 19 11:36:05 2015 -0700 +++ b/mercurial/dirstate.py Tue May 19 10:40:40 2015 -0700 @@ -985,7 +985,7 @@ # fast path -- filter the other way around, since typically files is # much smaller than dmap return [f for f in files if f in dmap] - if not match.anypats() and all(fn in dmap for fn in files): + if match.prefix() and all(fn in dmap for fn in files): # fast path -- all the values are known to be files, so just return # that return list(files)