mercurial/match.py
changeset 41528 b7a0efb3c370
parent 41282 4fab8a7d2d72
child 41622 635a12c53ea6
--- a/mercurial/match.py	Sun Feb 03 10:01:43 2019 +0100
+++ b/mercurial/match.py	Mon Feb 04 18:14:03 2019 +0300
@@ -677,6 +677,9 @@
     def visitdir(self, dir):
         if self._m2.visitdir(dir) == 'all':
             return False
+        elif not self._m2.visitdir(dir):
+            # m2 does not match dir, we can return 'all' here if possible
+            return self._m1.visitdir(dir)
         return bool(self._m1.visitdir(dir))
 
     def visitchildrenset(self, dir):