main
#11 / 100
Fix push 422 on fresh remotes: query /refs before building pack
Before this change, pushing to a remote with no local tracking cache (e.g. first push to 'local') fell back to an empty 'have' list, causing build_pack to bundle every object in the repo (2338 → 422 too_long).
The fix: call GET /refs (fetch_remote_info) on the transport before building the pack. This gives authoritative have-anchors directly from the server, regardless of whether local tracking refs exist. Falls back to cached tracking refs, then all known remote heads, then empty (for a truly empty remote).
1
file changed
415
files in snapshot
Files Changed
415 in snapshot
~1
No comments yet. Be the first to start the discussion.