Skip to content

Fix rm failing on in-sync worktree - #70

Merged
nnutter merged 2 commits into
masterfrom
fix-rm
Oct 4, 2026
Merged

nnutter merged 2 commits into
masterfrom
fix-rm

Conversation

@nnutter

@nnutter nnutter commented Oct 4, 2026

Copy link
Copy Markdown
Owner

No description provided.

A fresh worktree on main that is in sync with origin/main is
reported as not merged, so remove refuses to delete it. The test
creates main and removes it immediately, reproducing the failure.
The self-named upstream guard rejects any branch tracking its own
remote ref, which is right for feature branches but wrong for the
default branch tracking itself: main contained in origin/main has
nothing unpushed to lose, so removing its worktree is safe.
@nnutter
nnutter enabled auto-merge October 4, 2026 23:51
@nnutter
nnutter merged commit 3257646 into master Oct 4, 2026
1 check passed
@nnutter
nnutter deleted the fix-rm branch October 4, 2026 23:53
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