git: correctly check for type of object when walking
authorJosef 'Jeff' Sipek <jeffpc@josefsipek.net>
Mon, 01 Jun 2020 09:22:53 -0400
changeset 44928 935c9f347bdb
parent 44927 472b14da52c2
child 44929 3679c88b7f4e
git: correctly check for type of object when walking
hgext/git/manifest.py
--- a/hgext/git/manifest.py	Mon Jun 01 08:59:48 2020 -0400
+++ b/hgext/git/manifest.py	Mon Jun 01 09:22:53 2020 -0400
@@ -168,7 +168,7 @@
         for te in tree:
             # TODO: can we prune dir walks with the matcher?
             realname = subdir + pycompat.fsencode(te.name)
-            if te.type == r'tree':
+            if te.type == pygit2.GIT_OBJ_TREE:
                 for inner in self._walkonetree(
                     self._git_repo[te.id], match, realname + b'/'
                 ):