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.
0 comments
muse hub commit comment sha256:12972597eb9408b80b0f31fd956a89d8f2ff5df1b041124cffcf35688fde9c0e --body "your comment"
No comments yet. Be the first to start the discussion.