diff --git a/dulwich/repo.py b/dulwich/repo.py index 35ad13185e60b8f96384d457910ab01d8fff0acf_ZHVsd2ljaC9yZXBvLnB5..0c94e860a0edf810802fb9575022dc0b3e1182a9_ZHVsd2ljaC9yZXBvLnB5 100644 --- a/dulwich/repo.py +++ b/dulwich/repo.py @@ -427,7 +427,7 @@ cmode = None if basetree: for (bmode, bname, bsha) in basetree.entries(): - if bmode == 57344: # TODO : properly handle submodules + if bmode == 0160000: # TODO : properly handle submodules continue basefiles.add(bname) bobj = self.get_object(bsha) @@ -447,7 +447,7 @@ # handle removals if comptree: for (bmode, bname, bsha, ) in comptree.entries(): - if bmode == 57344: # TODO: hande submodles + if bmode == 0160000: # TODO: hande submodles continue if bname not in basefiles: bobj = self.get_object(bsha) diff --git a/git_handler.py b/git_handler.py index 35ad13185e60b8f96384d457910ab01d8fff0acf_Z2l0X2hhbmRsZXIucHk=..0c94e860a0edf810802fb9575022dc0b3e1182a9_Z2l0X2hhbmRsZXIucHk= 100644 --- a/git_handler.py +++ b/git_handler.py @@ -389,7 +389,7 @@ changes = list() changes.append((tree, path)) for (mode, name, sha) in tree.entries(): - if mode == 57344: # TODO : properly handle submodules and document what 57344 means + if mode == 0160000: # TODO : properly handle submodules and document what 57344 means continue if sha in seen: continue @@ -484,9 +484,9 @@ def convert_git_int_mode(self, mode): # TODO : make these into constants convert = { - 33188: '', - 40960: 'l', - 33261: 'x'} + 0100644: '', + 0100755: 'x', + 0120000: 'l'} if mode in convert: return convert[mode] return ''