changeset 44970:3679c88b7f4e

git: don't yield paths for directories when walking
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Mon, 01 Jun 2020 09:40:18 -0400
parents 935c9f347bdb
children 47ce28a78f4a
files hgext/git/manifest.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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