Skip to content

feat: accept worktree paths as arguments in branch-delete#239

Merged
avihut merged 1 commit intomasterfrom
fix/branch-delete-by-wt-path
Feb 19, 2026
Merged

feat: accept worktree paths as arguments in branch-delete#239
avihut merged 1 commit intomasterfrom
fix/branch-delete-by-wt-path

Conversation

@avihut
Copy link
Owner

@avihut avihut commented Feb 19, 2026

Summary

  • Allow git-worktree-branch-delete to accept worktree paths (absolute, relative, or .) in addition to branch names
  • Paths are resolved to the branch checked out in the worktree, making it convenient to delete a branch without remembering its name (e.g., git worktree-branch-delete . from inside a worktree)
  • Errors clearly when a worktree has a detached HEAD (no branch to infer)

Test plan

  • Existing 11 integration tests continue to pass
  • New test: delete by relative worktree path
  • New test: delete by absolute worktree path
  • New test: delete by . (current directory)
  • Unit tests pass (350 tests)
  • Clippy clean, fmt clean, man pages and CLI docs regenerated

🤖 Generated with Claude Code

Allow git-worktree-branch-delete to accept worktree paths (absolute,
relative, or ".") in addition to branch names. The branch checked out
in the worktree is resolved automatically, making it convenient to
delete a branch without remembering its name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@avihut avihut self-assigned this Feb 19, 2026
@avihut avihut added this to the v1.1.0 milestone Feb 19, 2026
@avihut avihut added the feat New feature label Feb 19, 2026
@avihut avihut merged commit c89fdfd into master Feb 19, 2026
6 checks passed
@avihut avihut deleted the fix/branch-delete-by-wt-path branch February 19, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant