Add --target-max-ref-updates flag; quiet ref-only batch progress

main

Commit

Soph2mo ago

Plumb a per-target ref-update batch size through the Pusher (MaxRefUpdates), the syncer config, the unstable Options, and the replicate/sync/plan/bootstrap commands as --target-max-ref-updates. Zero keeps the env-or-default limit (GITSYNC_MAX_REF_UPDATES_PER_PUSH or 5000); a positive value overrides it — raise it for entire-server targets (up to 25k), lower it for stricter providers. No global mutable state: the value rides on the Pusher.

Also stop spewing a bare "target:" sideband line per ref-only follow-up batch: those carry no useful progress, so push them with progress suppressed and, when verbose, emit one concise "pushed ref-update batch N/M (K refs)" line per batch instead.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: d908aa3f2758

Checkpoints

We have a repo with 50k refs and we go this error: 2026/06/18 13:17:39 WARN Permanent sync error, terminating error="sync: replicate relay failed: replicate execute: push target refs: target receive-p

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1