Commit Diff


commit - 66e8444bc467881687c000565173eb3e8afac02d
commit + 0bfa06e59123c574243c899182ffa6cc208efd09
blob - 2fa5124ac854f3d6eeb2b3302b46cd272442e02b
blob + 19c6f582c1e020ec9345cd369bc8a87e3a44778d
--- swh/loader/git/loader.py
+++ swh/loader/git/loader.py
@@ -792,6 +792,8 @@ class GitLoader(BaseGitLoader):
                 commits[commit_hash] = tree_hash
                 for parent_hex in commit.parents:
                     if parent_hex in parents:
+                        continue
+                    if parent_hex not in self.pack:
                         continue
                     parent_hash = hashutil.bytehex_to_hash(parent_hex)
                     if parent_hash in commits.keys():