Leaving a worktree warns about possible unpushed commits instead of claiming zero.
What's wrong with this entry?
When leaving a worktree, Claude Code counts commits on its branch to tell you what removal would discard. If that count cannot be computed, the dialog now says so and warns the branch may hold unpushed commits, instead of silently claiming zero. Live for everyone.
- The count is only used when there is an original HEAD commit and
git rev-list --countexits 0; hook-based worktrees count as zero; otherwise the count is null. - Unknown counts are reported as
-1intengu_worktree_keptandtengu_worktree_removedrather than a fabricated 0. - The removal confirmation names the branch and mentions discarded work only when there were uncommitted changes.
Worktree and branch ${a.worktreeBranch} removed., may hold unpushed commits (commit baseline unavailable). The branch will be deleted if you remove., tengu_worktree_removed
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.222
Resuming into a missing or unverifiable worktree is now explained
Both mention worktree
-
v2.1.222
Worktree creation validates the resulting root before use
Both mention worktree
-
v2.1.239
worktree.locationsetting for Desktop SSH sessionsBoth mention worktree