# HG changeset patch
# User Kyle Lippincott <spectral@google.com>
# Date 2018-08-09 00:03:05
# Node ID b9f94d67ea732831cedc60de95698a0e6e5b1d06
# Parent  f356be1a7ba3aff49d473eca52eadd59f3d3f778

match: add missing "return set()", add FIXME to test to doc a bug

These were both brought up during the codereview of D4130.

Differential Revision: https://phab.mercurial-scm.org/D4160

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -910,6 +910,7 @@ class prefixdirmatcher(basematcher):
             return self._matcher.visitchildrenset(dir[len(self._pathprefix):])
         if dir in self._pathdirs:
             return 'this'
+        return set()
 
     def isexact(self):
         return self._matcher.isexact()
diff --git a/tests/test-match.py b/tests/test-match.py
--- a/tests/test-match.py
+++ b/tests/test-match.py
@@ -97,6 +97,8 @@ class PatternMatcherTests(unittest.TestC
         self.assertEqual(m.visitchildrenset('.'), 'this')
         self.assertEqual(m.visitchildrenset('dir/subdir/x'), set())
         self.assertEqual(m.visitchildrenset('folder'), set())
+        # FIXME: These should probably be {'subdir'} and 'this', respectively,
+        # or at least 'this' and 'this'.
         self.assertEqual(m.visitchildrenset('dir'), set())
         self.assertEqual(m.visitchildrenset('dir/subdir'), set())