feat: consolidate worktree-branch-delete into worktree-branch -d/-D#253
Merged
feat: consolidate worktree-branch-delete into worktree-branch -d/-D#253
Conversation
Following the pattern from #250 (checkout-branch → checkout -b), absorb the standalone git-worktree-branch-delete command into git-worktree-branch -d/-D, mirroring git branch -d/-D semantics. - git worktree-branch -d: safe delete (checks merge status) - git worktree-branch -D: force delete - daft remove: injects -d before parsing (same as daft start injects -b) - git-worktree-branch-delete: kept as deprecated shim with warning - gwtbd shortcut: now routes to git-worktree-branch -d Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The new git-worktree-branch command was missing from the symlink creation and verification lists in the CI test and homebrew workflows, causing integration tests to fail with "command not found". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Feb 22, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git-worktree-branch-deletecommand intogit-worktree-branch -d/-D, mirroring howgit branch -d/-Dworkscheckout-branchintocheckout -b)daft removenow injects-dbefore clap parsing (same asdaft startinjects-b)git-worktree-branch-deleteis kept as a deprecated backward-compat shim with a stderr warningChanges
New command:
git worktree-branch -d/-D-d(safe delete): checks merge status, uncommitted changes, remote sync-D(force delete): bypasses safety checks (except default branch protection)-d/-Dwith usage hintRouting updates
daft remove→worktree_branch::run_remove()(injects-d)gwtbdshortcut →git-worktree-branch -dBackward compatibility
git worktree-branch-deletestill works, prints deprecation warningTest plan
mise run fmtpassesmise run clippypasses (zero warnings)mise run test:unitpasses (366 tests)mise run man:verifypassesmise run docs:cli:verifypassesmise run test:integration— new tests for-d,-D, no-flag error, and deprecation warninggit worktree-branch -d <branch>safe deletegit worktree-branch -D <branch>force deletedaft remove <branch>still worksgit-worktree-branch-delete <branch>shows deprecation warning🤖 Generated with Claude Code