Include completed branch tips as haves when fetching subsequent branches
Commit

In a multi-branch bootstrap, each branch fetched as if the target was empty — the source had no way to know that previous branches had already pushed shared objects. For repos like linux where master and nocache-cleanup share ~99% of history, this meant re-transferring ~5 GiB of duplicate objects for the second branch.
Fix: maintain a completedRefs map across the branch loop. After each branch finishes, add its tip (and temp ref) to the map. When fetching checkpoints for the next branch, merge completedRefs into the haves passed to FetchPack. The source can then delta-compress against objects the target already has, producing a much smaller pack for branches that share history.
The tag phase already did this (it built tagTargetRefs from the completed batches). The branch-to-branch loop was the gap.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com Entire-Checkpoint: da38c1b34ae1