Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 32439:284b18303f61
match: replace icasefsmatch() function by flag to regular match()
match() will soon gain more logic and we don't want to duplicate that
in icasefsmatch(), so merge the two functions instead and use a flag
to get case-insensitive behavior.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 18 May 2017 22:20:59 -0700 |
parents | 24245b54aa8a |
children | 3e2e179ef031 |
line wrap: on
line diff
--- a/mercurial/context.py Thu May 18 16:48:02 2017 -0700 +++ b/mercurial/context.py Thu May 18 22:20:59 2017 -0700 @@ -1593,13 +1593,11 @@ # Only a case insensitive filesystem needs magic to translate user input # to actual case in the filesystem. - matcherfunc = matchmod.match - if not util.fscasesensitive(r.root): - matcherfunc = matchmod.icasefsmatch - return matcherfunc(r.root, r.getcwd(), pats, - include, exclude, default, - auditor=r.auditor, ctx=self, - listsubrepos=listsubrepos, badfn=badfn) + icasefs = not util.fscasesensitive(r.root) + return matchmod.match(r.root, r.getcwd(), pats, include, exclude, + default, auditor=r.auditor, ctx=self, + listsubrepos=listsubrepos, badfn=badfn, + icasefs=icasefs) def _filtersuspectsymlink(self, files): if not files or self._repo.dirstate._checklink: