Patchwork D5919: match: remove unused "exact" argument (API)

login
register
mail settings
Submitter phabricator
Date Feb. 9, 2019, 9:39 p.m.
Message ID <311c51eeabfb5c7a64fd59e77595cd2a@localhost.localdomain>
Download mbox | patch
Permalink /patch/38587/
State Not Applicable
Headers show

Comments

phabricator - Feb. 9, 2019, 9:39 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG635a12c53ea6: match: remove unused &quot;exact&quot; argument (API) (authored by martinvonz, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D5919?vs=13946&id=13952#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5919?vs=13946&id=13952

REVISION DETAIL
  https://phab.mercurial-scm.org/D5919

AFFECTED FILES
  mercurial/match.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -115,7 +115,7 @@ 
     return unionmatcher(matchers)
 
 def match(root, cwd, patterns=None, include=None, exclude=None, default='glob',
-          exact=False, auditor=None, ctx=None, listsubrepos=False, warn=None,
+          auditor=None, ctx=None, listsubrepos=False, warn=None,
           badfn=None, icasefs=False):
     """build an object to match a set of file patterns
 
@@ -126,7 +126,6 @@ 
     include - patterns to include (unless they are excluded)
     exclude - patterns to exclude (even if they are included)
     default - if a pattern in patterns has no explicit type, assume this one
-    exact - patterns are actually filenames (include/exclude still apply)
     warn - optional function used for printing warnings
     badfn - optional bad() callback for this matcher instead of the default
     icasefs - make a matcher for wdir on case insensitive filesystems, which
@@ -150,9 +149,6 @@ 
     """
     normalize = _donormalize
     if icasefs:
-        if exact:
-            raise error.ProgrammingError("a case-insensitive exact matcher "
-                                         "doesn't make sense")
         dirstate = ctx.repo().dirstate
         dsnormalize = dirstate.normalize
 
@@ -171,9 +167,7 @@ 
                 kindpats.append((kind, pats, source))
             return kindpats
 
-    if exact:
-        m = exactmatcher(root, cwd, patterns, badfn)
-    elif patterns:
+    if patterns:
         kindpats = normalize(patterns, default, root, cwd, auditor, warn)
         if _kindpatsalwaysmatch(kindpats):
             m = alwaysmatcher(root, cwd, badfn, relativeuipath=True)