Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/git/utils.py
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | return { | ||||
name: HexBytes(target) | name: HexBytes(target) | ||||
for name, target in refs.items() | for name, target in refs.items() | ||||
if not ignore_branch_name(name) | if not ignore_branch_name(name) | ||||
} | } | ||||
def warn_dangling_branches( | def warn_dangling_branches( | ||||
branches: Dict[bytes, Optional[SnapshotBranch]], | branches: Dict[bytes, Optional[SnapshotBranch]], | ||||
dangling_branches: Dict[bytes, bytes], | dangling_branches: Dict[HexBytes, bytes], | ||||
logger: logging.Logger, | logger: logging.Logger, | ||||
origin_url: str, | origin_url: str, | ||||
) -> None: | ) -> None: | ||||
dangling_branches = { | dangling_branches = { | ||||
target: ref for target, ref in dangling_branches.items() if not branches[target] | target: ref for target, ref in dangling_branches.items() if not branches[target] | ||||
} | } | ||||
if dangling_branches: | if dangling_branches: | ||||
Show All 11 Lines |