Page MenuHomeSoftware Heritage

D6096.diff
No OneTemporary

D6096.diff

diff --git a/swh/vault/cookers/git_bare.py b/swh/vault/cookers/git_bare.py
--- a/swh/vault/cookers/git_bare.py
+++ b/swh/vault/cookers/git_bare.py
@@ -193,13 +193,21 @@
if snapshot is None:
# refs were already written in a previous step
return
+ branches = []
+ for (branch_name, branch) in snapshot.branches.items():
+ if branch is None:
+ logging.error(
+ "%s has dangling branch: %r", snapshot.swhid(), branch_name
+ )
+ else:
+ branches.append((branch_name, branch))
refs = {
branch_name: (
b"ref: " + branch.target
if branch.target_type == TargetType.ALIAS
else hash_to_bytehex(branch.target)
)
- for (branch_name, branch) in snapshot.branches.items()
+ for (branch_name, branch) in branches
}
else:
assert False, obj_type

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 30, 12:56 PM (1 w, 15 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218735

Event Timeline