git: don't yield paths for directories when walking
authorJosef 'Jeff' Sipek <jeffpc@josefsipek.net>
Mon, 01 Jun 2020 09:40:18 -0400
changeset 44929 3679c88b7f4e
parent 44928 935c9f347bdb
child 44930 47ce28a78f4a
git: don't yield paths for directories when walking
hgext/git/manifest.py
--- a/hgext/git/manifest.py	Mon Jun 01 09:22:53 2020 -0400
+++ b/hgext/git/manifest.py	Mon Jun 01 09:40:18 2020 -0400
@@ -173,9 +173,8 @@
                     self._git_repo[te.id], match, realname + b'/'
                 ):
                     yield inner
-            if not match(realname):
-                continue
-            yield pycompat.fsencode(realname)
+            elif match(realname):
+                yield pycompat.fsencode(realname)
 
     def walk(self, match):
         # TODO: this is a very lazy way to merge in the pending