Expose FollowInfoRefsRedirect through public gitsync API

main

Commit

nodo5mo ago

The flag was previously on gitproto.Conn but unreachable from normal gitsync callers — gitproto is an internal package, and neither syncer.Endpoint, internalbridge.Endpoint, nor pkg/gitsync.Endpoint carried it. This made the flag dead config for CLI and library users.

Wire it through the endpoint-shaped layers (pkg/gitsync.Endpoint → internalbridge.Endpoint → syncer.Endpoint → gitproto.Conn). Per- endpoint rather than whole-Config so source and target can opt in independently — mirror-worker only needs it on the target.

Adds two tests:

  • An integration test at the gitproto level that runs the full info/refs → follow-up POST sequence against two httptest servers (entry that 307s, node that serves the pack) and asserts the POST lands on the node, not the entry. This is the property that makes the feature useful.
  • A plumbing test at the syncer level proving newConn propagates the flag from Endpoint to Conn — guards against the exact regression the reviewer flagged.

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