changeset 44928:935c9f347bdb

git: correctly check for type of object when walking
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Mon, 01 Jun 2020 09:22:53 -0400
parents 472b14da52c2
children 3679c88b7f4e
files hgext/git/manifest.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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'/'
                 ):