gabriel / muse public
fix minor push dev
gabriel · 70 days ago · Apr 7, 2026 · Diff

fix(push): include merge commit's second parent in branch_have

When pushing a merge commit, branch_have only contained the target branch's remote HEAD. The BFS in walk_commits would follow parent2 (the merged branch's tip) without a stop anchor, walking and sending the merged branch's entire history to the server — potentially thousands of already-remote commits.

Fix: after computing branch_have, read the local HEAD commit. If it is a merge commit and parent2 is a known remote ref (i.e. was already pushed on another branch), append it to branch_have. The BFS then stops at both parents immediately, and the bundle contains only the merge commit itself.

The full `have` set is intentionally NOT used for branch_have — using arbitrary remote refs risks short-circuiting the BFS at an intermediate branch and producing a bundle the server rejects as non-fast-forward. Only direct parents of the local HEAD are safe to add.

sha256:12972597eb9408b80b0f31fd956a89d8f2ff5df1b041124cffcf35688fde9c0e sha
sha256:6f6f21f0becc1dba9783ac08d695256209e979433eb0a7eb5b565c26b1834304 snapshot
← Older Oldest on dev
All commits
Newer → Latest on dev

0 comments

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

To add a comment, use the Muse CLI: muse hub commit comment sha256:12972597eb9408b80b0f31fd956a89d8f2ff5df1b041124cffcf35688fde9c0e --body "your comment"