Skip to content

Stop the resume from crash-looping when the kept parent branch is gone#55

Merged
Phlogistique merged 2 commits into
mainfrom
claude/git-merge-abort-crash-sc64z6
Jun 11, 2026
Merged

Stop the resume from crash-looping when the kept parent branch is gone#55
Phlogistique merged 2 commits into
mainfrom
claude/git-merge-abort-crash-sc64z6

Conversation

@Phlogistique

Copy link
Copy Markdown
Collaborator

If origin/<old base> was deleted while a child PR sat in conflict (auto-delete head branches left enabled despite the README, or manual deletion), the resume merge failed with "not something we can merge" and git merge --abort failed too ("There is no merge to abort"). The run then exited nonzero after re-posting the misleading conflict comment and the label, repeating on every push. (Not a mid-function set -e kill: update_direct_target is called in an if condition, which suppresses errexit; observed via the new test scenario.)

Check origin/<old base> up front like the existing target-branch check, and only run git merge --abort when MERGE_HEAD exists.

Base of the stack continued in #52 and #53.

https://claude.ai/code/session_01STkeSJ7cLrmrNn4aTDYkwH


Generated by Claude Code

claude added 2 commits June 9, 2026 21:37
…esolution

If origin/<old base> was deleted while a child PR sat in conflict
(auto-delete head branches left enabled despite the README, or manual
deletion), the resume merge failed with "not something we can merge" and
git merge --abort failed too ("There is no merge to abort"). The run then
exited nonzero after re-posting the misleading conflict comment and the
label, repeating on every push. (Not a mid-function set -e kill:
update_direct_target is called in an if condition, which suppresses
errexit; observed via the new test scenario.)

Check origin/<old base> up front like #39 did for the target branch, and
only run git merge --abort when MERGE_HEAD exists.

https://claude.ai/code/session_01STkeSJ7cLrmrNn4aTDYkwH
Re-applied onto the restructured script: the merge --abort guard and the
origin/OLD_BASE existence check (now via the PR-number abandon_resume).
The regression test becomes scenario F, adapted to the PR_BASE payload.

https://claude.ai/code/session_01STkeSJ7cLrmrNn4aTDYkwH
@Phlogistique Phlogistique marked this pull request as ready for review June 11, 2026 13:09
@Phlogistique Phlogistique merged commit 142dcba into main Jun 11, 2026
2 checks passed
@github-actions github-actions Bot deleted the claude/git-merge-abort-crash-sc64z6 branch June 11, 2026 13: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