smarthttp: optionally follow info/refs redirects into Endpoint
main·
Commit

Adds Conn.FollowInfoRefsRedirect (off by default). When set, RequestInfoRefs rewrites Endpoint.Scheme + Endpoint.Host to the final URL after HTTP redirects, so subsequent PostRPC* calls target the redirected node instead of the originally-configured entry point.
Matches vanilla git's smart-HTTP behaviour for discovery-aware servers that 307 /info/refs to a hosting replica (the entiredb info/refs discovery design). Endpoint.Path is never modified — it still holds the repo path.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com Entire-Checkpoint: 359b871b7cfb