Commit Diff


commit - 39f0fdfed9b2a8f79ab8c89c11bfa8ecf0121fbe
commit + f4fe1ade794b94c6b1966a9c13c570d155ae8d01
blob - 900dd6eb0051068c26304afd099ae2892422d001
blob + b8b889eb6b35817016237e12ec5504adaa078fe3
--- swh/loader/git/loader.py
+++ swh/loader/git/loader.py
@@ -866,6 +866,8 @@ class GitLoader(BaseGitLoader):
                 for name, mode, entry_hex in tree.iteritems():
                     if mode & submodule_mode == submodule_mode:
                         continue  # ignore submodules
+                    if entry_hex not in self.pack:
+                        continue
                     entry_hash = hashutil.bytehex_to_hash(entry_hex)
                     if mode & stat.S_IFDIR:
                         if entry_hash not in traversed_trees: