mercurial/match.py
changeset 32325 763d72925691
parent 32324 77dac8fd30ee
child 32395 24245b54aa8a
--- a/mercurial/match.py	Fri May 12 16:31:21 2017 -0700
+++ b/mercurial/match.py	Wed May 17 22:33:15 2017 -0700
@@ -385,9 +385,9 @@
         self._files = [f[len(path) + 1:] for f in matcher._files
                        if f.startswith(path + "/")]
 
-        # If the parent repo had a path to this subrepo and no patterns are
-        # specified, this submatcher always matches.
-        if not self._always and not matcher._anypats:
+        # If the parent repo had a path to this subrepo and the matcher is
+        # a prefix matcher, this submatcher always matches.
+        if matcher.prefix():
             self._always = any(f == path for f in matcher._files)
 
         self._anypats = matcher._anypats