Commit Diff


commit - a2bed2903feedc4ea80d283220d137df051b4d69
commit + 11d49a78db785e502777cd2273407d1902b3ee01
blob - 05b4534ae786728b1c87c7368a4670dfe962a2a5
blob + 91f10ecb4e51bcd46d60a900c648ee90ea643aba
--- swh/loader/git/loader.py
+++ swh/loader/git/loader.py
@@ -732,6 +732,8 @@ class GitLoader(BaseGitLoader):
                 continue
 
             while obj.type_name == b"tag":
+                if obj.id in self.ref_object_types:
+                    self.ref_object_types[obj.id] = SnapshotTargetType.RELEASE
                 tag_hash = hashutil.bytehex_to_hash(ref_object_hex)
                 tagged_object_hex = obj.object[1]
                 try:
@@ -753,8 +755,10 @@ class GitLoader(BaseGitLoader):
                 )
                 continue
 
-            parents = [ref_object_hex]
+            if obj.id in self.ref_object_types:
+                self.ref_object_types[obj.id] = SnapshotTargetType.REVISION
 
+            parents = [ref_object_hex]
             while len(parents) > 0:
                 commit_hex = parents.pop(0)
                 try: