Repository navigation
Add pre-remove hook for cleanup before worktree removal - #107
Merged
Merged
Conversation
max-sixty
force-pushed
the
post-remove
branch
from
December 8, 2025 19:05
4f5d048 to
ec544b6
Compare
Implement pre-remove hooks that run before `wt remove` deletes a worktree. This allows cleanup tasks, state saving, or external notifications before removal. Key features: - FailFast strategy: non-zero exit code aborts removal (worktree preserved) - Runs in both sync and background modes (before spawning background) - All standard template variables available (branch, worktree, repo, etc.) - Does not run for branch-only removal (no worktree) - Skip with `--no-verify` flag - Run manually with `wt step pre-remove` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
max-sixty
force-pushed
the
post-remove
branch
from
December 8, 2025 19:10
ec544b6 to
c8dcdf0
Compare
Owner
Author
|
closes a subset of #101 |
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
pre-removehook that runs beforewt removedeletes a worktree--no-verifyflag to skip hookswt step pre-removefor manual executionTest plan
--no-verifyskips hookswt step pre-removeworks🤖 Generated with Claude Code