Skip to content

pr.sh: leave a diverged local main alone after the merge - #17

Merged
markope merged 1 commit into
mainfrom
pr-leave-branch-safe
Oct 26, 2026
Merged

markope merged 1 commit into
mainfrom
pr-leave-branch-safe

Conversation

@markope

@markope markope commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

After the merge, pr.sh now switches to the local main only when it is an ancestor of origin/main; otherwise it continues detached on origin/main and leaves main untouched (seen with studio: a local main with unpushed commits stopped the script before it waited for the release run). Test plus mutation check.

After a release merge, pr.sh switched to the local main and fast-forwarded it. When that main held unpushed commits (or was checked out in another worktree), the pull failed and the script stopped before waiting for the release run. It now takes over the local main only when main can follow origin/main; otherwise it continues detached on origin/main and leaves main as it is.
@markope
markope merged commit a62a8a4 into main Oct 26, 2026
66 checks passed
@markope
markope deleted the pr-leave-branch-safe branch October 26, 2026 07:41
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.

1 participant