gabriel / muse public
main #9 / 100

Fix push 422: filter have-anchors to locally-known commits

GET /refs returns the remote's branch heads, but those commits may not exist in the local object store (e.g. GitHub merge commits never fetched). Without filtering, build_pack's BFS can't stop at them and walks the entire history (2338 objects → 422 too_long).

Fix: combine live remote heads with all cached cross-remote tracking refs, then filter the combined list to commits that exist locally. The cached origin/dev and origin/main entries are in the local store and are ancestors of the pushed branch, so build_pack stops at the nearest one (3 commits, ~424 objects) rather than sending everything.

G Gabriel Cardona <gabriel@tellurstori.com> · 14h ago Mar 23, 2026 · 7fd04b9f · parent a815e85a
1
file changed
415
files in snapshot
Files Changed 415 in snapshot
~1

0 comments

No comments yet. Be the first to start the discussion.