Repository navigation
feat(worktree): add filter mode for worktree-clean (#158) - #160
Merged
Merged
Conversation
Refs: #158 Co-authored-by: Cursor <[email protected]>
- Default: clean only stopped worktrees, skip running tmux sessions - 'all' mode: clean all worktrees (previous behavior) with warning - Summary output: cleaned vs skipped - BATS tests for stopped-only, all mode, invalid mode, wt-clean alias Refs: #158 Co-authored-by: Cursor <[email protected]>
5 tasks
Signed-off-by: gerchowl <[email protected]>
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.
Description
Adds a
modeparameter toworktree-cleanso the default cleans only stopped worktrees (no running tmux session), whilejust worktree-clean allretains the previous behavior (clean all worktrees). Summary output shows what was cleaned vs skipped.Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlychore-- Maintenance task (deps, config, etc.)refactor-- Code restructuring (no behavior change)test-- Adding or updating testsci-- CI/CD pipeline changesbuild-- Build system or dependency changesrevert-- Reverts a previous commitstyle-- Code style (formatting, whitespace)Modifiers
!) -- This change breaks backward compatibilityChanges Made
mode=""parameter toworktree-clean; stopped-only logic skips dirs with running tmux sessions;allmode retains previous behavior with warning; summary output (cleaned vs skipped)Changelog Entry
Changed
just worktree-clean(no args) now cleans only stopped worktrees, skips running tmux sessionsjust worktree-clean allretains previous behavior (clean all worktrees) with warningjust wt-cleanalias unchangedTesting
just test)Manual Testing Details
just worktree-clean(no args): cleaned only stopped worktrees, skipped running sessionjust worktree-clean all: cleaned all worktrees including running sessionsjust wt-cleanandjust wt-clean all: alias worksjust worktree-clean invalid: exits with errorjust test-bats— all 238 tests pass including 4 new worktree-clean testsChecklist
docs/templates/, then runjust docs)CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
Design and implementation plan posted on issue #158.
Refs: #158