Sharpen --all-refs semantics: branch-filter override, Pusher pointer, prune coverage
Commit

Third-pass review caught four sharpening items, all addressed:
-
--branch foo --all-refs was inconsistent: branches got filtered to foo, but tags and other-kind refs were unconditionally included. The doc claimed "in addition to whatever existing flags select," but for tags the implementation overrode the existing scope. New helper normalizeAllRefs(cfg) clears cfg.Branches at the entry of the three plan builders so AllRefs really means every branch. replicate- CanBootstrap mirrors the same logic via a branchScopeCovers predicate. Test pins the override.
-
NewPusher returned Pusher by value with value-receiver methods. The wiring at session construction (set OnRejection on the stored value, then later pass it to strategies) only worked because field assignment came before strategies captured copies. A future refactor that reordered those steps would break BestEffort silently. Switch to *Pusher with pointer receivers — strategies now hold a pointer so any later OnRejection mutation flows through. Strategy interfaces still satisfied since *Pusher.PushPack matches the same shape.
-
BestEffort only covers target-side receive-pack rejections, not source-side upload-pack failures. A server that advertises a hidden ref but refuses to serve a
wantfor its tip (Gerrit refs/changes/* is the common case) errors out the whole fetch with no warn granularity. usage.md now spells this out so users don't expect per-ref warn semantics for source rejections. -
sync --all-refs --prune lacked a dedicated regression. The replicate path was covered, and addPruneCandidates is shared, but the sync side wasn't pinned. New TestRun_IntegrationAllRefsSyncPrune- DeletesStaleOtherRef seeds a stale refs/notes/stale on target and asserts sync --all-refs --prune deletes it.
(JSON warned field stays without omitempty — the field-always-present shape is a release-note concern for whenever this branch ships.)
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com Entire-Checkpoint: 830978bf4f5c