Skip to content

Support rebase merges#60

Merged
Phlogistique merged 7 commits into
mainfrom
claude/autorestack-rebase-merge-support
Jul 6, 2026
Merged

Support rebase merges#60
Phlogistique merged 7 commits into
mainfrom
claude/autorestack-rebase-merge-support

Conversation

@Phlogistique

Copy link
Copy Markdown
Collaborator

Stacked on #59.

A rebase merge lands the branch's content as new commits without merging its history, same as a squash spread over several commits. The old refusal reasons were specific to the merge dance, which merged SQUASH_COMMIT~ and so could conflict against intermediate copies; the single-merge re-parent (#56) only reads the landed tip's tree, and with --absorbed (#59) the recorded parent is the merged branch's tip in both cases. So the squash path handles rebase merges as-is.

This deletes the squash-vs-rebase detection (is_rebase_merge and its commit-PR association polling, the flakiest part of the action: the association is computed asynchronously and had to be waited for). The only case left to detect is a merge-commit merge, where the children already contain their parent's history and the action only retargets. tests/test_rebase_merge_skip.sh, which asserted the old refusal, becomes tests/test_rebase_merge.sh and asserts the update.


Generated by Claude Code

claude added 2 commits July 4, 2026 13:50
Re-vendors git-merge-onto 0.2.0 and passes --absorbed in the action's
re-parent and in the posted resolution command, so the result descends
from the merged branch's tip and the PR stays mergeable (and its resume
event firing) until it is retargeted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PHUVU3Ek3U9j3LrdjPnyAy
A rebase merge lands the branch's content as new commits without
merging its history, same as a squash spread over several commits, and
the single-merge re-parent only reads the landed tip's tree. So the
squash path handles it as-is, and the squash-vs-rebase detection
(commit-PR association polling) goes away; the only case left to detect
is a merge commit, where the action has nothing to re-parent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PHUVU3Ek3U9j3LrdjPnyAy
@github-actions github-actions Bot changed the base branch from claude/autorestack-action-conflict-vemewk to main July 6, 2026 09:19
@Phlogistique Phlogistique marked this pull request as ready for review July 6, 2026 09:21
@Phlogistique Phlogistique merged commit 7d6e326 into main Jul 6, 2026
6 checks passed
@github-actions github-actions Bot deleted the claude/autorestack-rebase-merge-support branch July 6, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants