git-worktrees 0.13.2__tar.gz → 0.13.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/AGENTS.md +4 -2
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/CHANGELOG.md +8 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/PKG-INFO +11 -9
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/README.md +10 -8
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/conf.d/worktrees.fish +1 -1
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/REFERENCE.md +7 -4
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/.claude-plugin/plugin.json +1 -1
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/.codex-plugin/plugin.json +1 -1
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/plugin.json +1 -1
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/pyproject.toml +1 -1
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/branches.py +3 -1
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/verdicts.py +3 -1
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_assessment.py +33 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_removal.py +47 -4
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/uv.lock +1 -1
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/worktrees.plugin.zsh +1 -1
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/.claude/settings.json +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/.codex/config.toml +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/.github/workflows/codeql.yml +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/.github/workflows/publish.yml +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/.github/workflows/testpypi.yml +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/.github/workflows/tests.yml +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/.gitignore +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/.pre-commit-config.yaml +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/.python-version +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/.releasetools.yaml +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/LICENSE +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/Makefile +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/completions/gw.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/completions/worktrees.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/BENCHMARK.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/DEVELOPMENT.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/commands/add.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/commands/branch-create.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/commands/branch-prune.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/commands/branch-status.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/commands/ci-checks.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/commands/fast-forward.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/commands/list.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/commands/merge.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/commands/preflight.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/commands/push.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/commands/stack-link.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/plans/2026-11-05-worktree-pruning-design.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gw.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwa.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwbc.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwbp.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwbs.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwff.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwl.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwm.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwp!.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwp.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwpa!.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwpa.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwpu.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwr!.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwr.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gwrk!.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/functions/gws.fish +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/hatch_build.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/README.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/hooks/codex.json +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/hooks/hooks.json +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/session.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/ci-checks/SKILL.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/describe-pr/SKILL.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/describe-pr/format.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/fast-forward/SKILL.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/preflight/SKILL.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/preflight/agents/openai.yaml +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/preflight/config.toml +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/preflight/merge_codex_rules.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/preflight/project.json +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/preflight/rules.json +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/preflight/worktrees.rules +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/prune/SKILL.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/ship-it/SKILL.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/plugin/skills/ship-it/rights.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/renovate.json +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/scripts/README.md +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/scripts/benchmark.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/scripts/bump_version.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/scripts/verify-publish.bash +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/__init__.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/audit.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/branch_cli.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/branch_forge.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/ci.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/cli.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/errors.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/fast_forward.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/forge.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/git.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/layout.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/merged.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/new_branch.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/pick.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/pr_merge.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/preflight.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/progress.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/prune.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/push.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/render.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/repo.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/stack_link.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/sync.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/src/worktrees/worktree.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/audit_schema.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/conftest.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_audit.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_benchmark.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_branch_forge.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_branches.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_ci.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_cli.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_command_defaults.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_completions.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_fast_forward.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_fixture.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_forge.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_gates.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_git_records.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_new_branch.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_partial_clone.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_path_boundaries.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_plugin.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_pr_merge.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_preflight.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_push.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_render.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_shims.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_spec.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_stack_link.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_sync.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_version.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/tests/test_worktree.py +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/completions/_gw +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gw +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwa +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwbc +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwbp +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwbs +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwff +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwl +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwm +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwp +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwp! +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwpa +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwpa! +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwpu +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwr +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwr! +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gwrk! +0 -0
- {git_worktrees-0.13.2 → git_worktrees-0.13.3}/zsh/plugins/worktrees/functions/gws +0 -0
|
@@ -805,8 +805,10 @@ state, then whether a remote-tracking ref holds the tip. It returns a reason:
|
|
|
805
805
|
`gw fast-forward` reads it as it is; prune's assessments split `unused` by
|
|
806
806
|
the branch's reflog into `merged`, `unused` and `stale`, and put the
|
|
807
807
|
checkout facts first, `uncommitted` among them. A row's verdict is `remove`
|
|
808
|
-
for `merged` and `stale
|
|
809
|
-
|
|
808
|
+
for `merged` and `stale`, and for any row made eligible by `--delete` or
|
|
809
|
+
`--keep-branch`; every other row reads `keep`. Its reason stays unchanged.
|
|
810
|
+
Tables, JSON, counts and `--only` use this verdict. First-parent history
|
|
811
|
+
belongs to the assessed head, not a divergent local counterpart.
|
|
810
812
|
|
|
811
813
|
Removing a worktree deletes its HEAD reflog and deleting a branch its
|
|
812
814
|
reflog. `merged.reflog_only` lists the commits only those reach, by
|
|
@@ -17,6 +17,14 @@ not in here, whatever it cost to build.
|
|
|
17
17
|
A release closes with a `### Choices` section when a decision in it is worth
|
|
18
18
|
the reader's time: what was chosen, and what the alternative failed to do.
|
|
19
19
|
|
|
20
|
+
## 0.13.3 - 2026-11-22
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
Rows made eligible by `--delete` or `--keep-branch` show `remove` in
|
|
25
|
+
worktree and branch assessments. Tables, JSON, counts and `--only` filters
|
|
26
|
+
use that verdict. The reason and deletion protections stay intact.
|
|
27
|
+
|
|
20
28
|
## 0.13.2 - 2026-11-22
|
|
21
29
|
|
|
22
30
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: git-worktrees
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.3
|
|
4
4
|
Summary: Git worktree commands that refuse to lose work.
|
|
5
5
|
Project-URL: Bug reports, https://github.com/MihaiBojin/worktrees/issues/new
|
|
6
6
|
Project-URL: Source, https://github.com/MihaiBojin/worktrees
|
|
@@ -108,7 +108,7 @@ the plugin's tag to the same release, as each manager below describes.
|
|
|
108
108
|
### fish
|
|
109
109
|
|
|
110
110
|
```console
|
|
111
|
-
fisher install MihaiBojin/worktrees@v0.13.
|
|
111
|
+
fisher install MihaiBojin/worktrees@v0.13.3
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
Fisher copies `functions/`, `completions/` and `conf.d/` from the repository
|
|
@@ -125,7 +125,7 @@ the untagged one holds the files.
|
|
|
125
125
|
Antidote takes a `path:` into the repository, and `branch:` takes a tag:
|
|
126
126
|
|
|
127
127
|
```
|
|
128
|
-
MihaiBojin/worktrees branch:v0.13.
|
|
128
|
+
MihaiBojin/worktrees branch:v0.13.3 path:zsh/plugins/worktrees # in zsh_plugins.txt
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
The plugin puts its own `functions/` and `completions/` on `fpath` and
|
|
@@ -200,8 +200,8 @@ its stdout stays the version alone for a script to read.
|
|
|
200
200
|
An excerpt of `gw --help`'s release lines with matching CLI and shell releases:
|
|
201
201
|
|
|
202
202
|
```console
|
|
203
|
-
worktrees 0.13.
|
|
204
|
-
The shell plugin here is 0.13.
|
|
203
|
+
worktrees 0.13.3: git worktree commands that refuse to lose work
|
|
204
|
+
The shell plugin here is 0.13.3, the same release as these commands.
|
|
205
205
|
```
|
|
206
206
|
|
|
207
207
|
A shell without the variable has no plugin loaded, or one older than the
|
|
@@ -250,8 +250,8 @@ A checked-out branch appears only as its worktree, never as a loose branch.
|
|
|
250
250
|
[Branch status](docs/commands/branch-status.md) describes the proofs;
|
|
251
251
|
[branch prune](docs/commands/branch-prune.md) covers selection and recovery.
|
|
252
252
|
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
The table shows verdicts without `--delete` or `--keep-branch`. A row's
|
|
254
|
+
`reason` names the first fact in the table that applies:
|
|
255
255
|
|
|
256
256
|
| Reason | Verdict | When |
|
|
257
257
|
| --- | --- | --- |
|
|
@@ -334,8 +334,10 @@ Repeat `--delete` to combine categories:
|
|
|
334
334
|
| `all` | every value above | same |
|
|
335
335
|
|
|
336
336
|
`gw branch status` rejects `--delete`. An unknown or unsupported value is a
|
|
337
|
-
usage error before mutation.
|
|
338
|
-
|
|
337
|
+
usage error before mutation. When `--delete` or `--keep-branch` makes a row
|
|
338
|
+
eligible, its verdict is `remove`; its reason stays unchanged.
|
|
339
|
+
|
|
340
|
+
When only missing values hold worktrees back, `gw prune` says so
|
|
339
341
|
and prints the command that grants them on a line of its own, keeping the
|
|
340
342
|
values you passed, then the worktrees it frees. The command takes no names;
|
|
341
343
|
`gw remove NAME` targets one worktree.
|
|
@@ -81,7 +81,7 @@ the plugin's tag to the same release, as each manager below describes.
|
|
|
81
81
|
### fish
|
|
82
82
|
|
|
83
83
|
```console
|
|
84
|
-
fisher install MihaiBojin/worktrees@v0.13.
|
|
84
|
+
fisher install MihaiBojin/worktrees@v0.13.3
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
Fisher copies `functions/`, `completions/` and `conf.d/` from the repository
|
|
@@ -98,7 +98,7 @@ the untagged one holds the files.
|
|
|
98
98
|
Antidote takes a `path:` into the repository, and `branch:` takes a tag:
|
|
99
99
|
|
|
100
100
|
```
|
|
101
|
-
MihaiBojin/worktrees branch:v0.13.
|
|
101
|
+
MihaiBojin/worktrees branch:v0.13.3 path:zsh/plugins/worktrees # in zsh_plugins.txt
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
The plugin puts its own `functions/` and `completions/` on `fpath` and
|
|
@@ -173,8 +173,8 @@ its stdout stays the version alone for a script to read.
|
|
|
173
173
|
An excerpt of `gw --help`'s release lines with matching CLI and shell releases:
|
|
174
174
|
|
|
175
175
|
```console
|
|
176
|
-
worktrees 0.13.
|
|
177
|
-
The shell plugin here is 0.13.
|
|
176
|
+
worktrees 0.13.3: git worktree commands that refuse to lose work
|
|
177
|
+
The shell plugin here is 0.13.3, the same release as these commands.
|
|
178
178
|
```
|
|
179
179
|
|
|
180
180
|
A shell without the variable has no plugin loaded, or one older than the
|
|
@@ -223,8 +223,8 @@ A checked-out branch appears only as its worktree, never as a loose branch.
|
|
|
223
223
|
[Branch status](docs/commands/branch-status.md) describes the proofs;
|
|
224
224
|
[branch prune](docs/commands/branch-prune.md) covers selection and recovery.
|
|
225
225
|
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
The table shows verdicts without `--delete` or `--keep-branch`. A row's
|
|
227
|
+
`reason` names the first fact in the table that applies:
|
|
228
228
|
|
|
229
229
|
| Reason | Verdict | When |
|
|
230
230
|
| --- | --- | --- |
|
|
@@ -307,8 +307,10 @@ Repeat `--delete` to combine categories:
|
|
|
307
307
|
| `all` | every value above | same |
|
|
308
308
|
|
|
309
309
|
`gw branch status` rejects `--delete`. An unknown or unsupported value is a
|
|
310
|
-
usage error before mutation.
|
|
311
|
-
|
|
310
|
+
usage error before mutation. When `--delete` or `--keep-branch` makes a row
|
|
311
|
+
eligible, its verdict is `remove`; its reason stays unchanged.
|
|
312
|
+
|
|
313
|
+
When only missing values hold worktrees back, `gw prune` says so
|
|
312
314
|
and prints the command that grants them on a line of its own, keeping the
|
|
313
315
|
values you passed, then the worktrees it frees. The command takes no names;
|
|
314
316
|
`gw remove NAME` targets one worktree.
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
# The release this plugin came from, which `gw --help` and `gw version` compare
|
|
5
5
|
# with their own. Exported, because the environment is all a binary can see
|
|
6
6
|
# of the shell that started it.
|
|
7
|
-
set -gx WORKTREES_PLUGIN_VERSION 0.13.
|
|
7
|
+
set -gx WORKTREES_PLUGIN_VERSION 0.13.3
|
|
@@ -64,8 +64,9 @@ that applies. Checkout facts come first: `main-checkout`, `current`,
|
|
|
64
64
|
`locked`, `missing`, `submodule`, `in-progress` (a rebase, merge,
|
|
65
65
|
cherry-pick, revert or bisect waiting in the worktree's git directory) and
|
|
66
66
|
`uncommitted`, then `protected` for `main`, `master` or the head branch.
|
|
67
|
-
Each of these reads `keep
|
|
68
|
-
|
|
67
|
+
Each of these reads `keep` unless `--keep-branch` makes a protected branch's
|
|
68
|
+
checkout eligible for removal. The branch's proof stays in `proof`. Without
|
|
69
|
+
a checkout or protection fact, the completion checks run in this order:
|
|
69
70
|
|
|
70
71
|
1. Matching cached forge proof gives `merged`.
|
|
71
72
|
2. A tip on the assessed head's first-parent history reads its branch's
|
|
@@ -76,7 +77,9 @@ one, the completion checks run in this order:
|
|
|
76
77
|
5. A cached request at the tip gives `closed` or `open`.
|
|
77
78
|
6. Commits a remote-tracking ref holds give `pushed`, others `unpushed`.
|
|
78
79
|
|
|
79
|
-
`merged` and `stale` read `remove
|
|
80
|
+
`merged` and `stale` read `remove`. Any row made eligible by `--delete` or
|
|
81
|
+
`--keep-branch` also reads `remove`; its reason stays unchanged. Every other
|
|
82
|
+
row reads `keep`. Tables, JSON, counts and `--only` use this verdict.
|
|
80
83
|
|
|
81
84
|
Removal deletes the branch's reflog, and the worktree's own HEAD reflog.
|
|
82
85
|
Assessment lists the commits those reach and no ref, worktree HEAD or kept
|
|
@@ -102,7 +105,7 @@ permits removal.
|
|
|
102
105
|
|
|
103
106
|
## Protections and permissions
|
|
104
107
|
|
|
105
|
-
`eligible` combines
|
|
108
|
+
`eligible` combines completion evidence, deletion permissions and protections.
|
|
106
109
|
`main`, `master` and the assessed head branch cannot be deleted. The main
|
|
107
110
|
checkout, locked worktrees, tracked changes, untracked files and initialized
|
|
108
111
|
submodules block worktree deletion. The submodule refusal names
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "worktrees",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.3",
|
|
5
5
|
"description": "Read CI, rebase onto the head branch, describe, ship and merge pull requests, and prune finished worktrees through the worktrees CLI",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Mihai Bojin",
|
|
@@ -9,7 +9,7 @@ authors = [
|
|
|
9
9
|
]
|
|
10
10
|
# Static, and the single source of truth for the version. Bump it in a pull
|
|
11
11
|
# request and run `uv lock`; the release tag only has to agree with it.
|
|
12
|
-
version = "0.13.
|
|
12
|
+
version = "0.13.3"
|
|
13
13
|
# The standard library answers every question this asks. A dependency here
|
|
14
14
|
# would be paid on every invocation, and an invocation is 67 ms of which 25 ms
|
|
15
15
|
# is the interpreter starting.
|
|
@@ -170,7 +170,6 @@ def _judge(
|
|
|
170
170
|
else []
|
|
171
171
|
)
|
|
172
172
|
row.reason, row.evidence = deciding[0] if deciding else (evidence, why)
|
|
173
|
-
row.verdict = REMOVE if row.reason in (merged.MERGED, merged.STALE) else KEEP
|
|
174
173
|
|
|
175
174
|
|
|
176
175
|
def _standing(
|
|
@@ -195,6 +194,9 @@ def _settle(
|
|
|
195
194
|
return row.found[0] in DONE and not _standing(row, hard, head_branch, values)
|
|
196
195
|
|
|
197
196
|
row.eligible = eligible(granted)
|
|
197
|
+
row.verdict = (
|
|
198
|
+
REMOVE if row.eligible or row.reason in (merged.MERGED, merged.STALE) else KEEP
|
|
199
|
+
)
|
|
198
200
|
row.needs = () if row.eligible else prune.needed(eligible, PERMISSIONS) or ()
|
|
199
201
|
row.facts = _standing(row, hard, head_branch, granted)
|
|
200
202
|
row.protections = prune.hinted(row.facts, row.needs)
|
|
@@ -374,7 +374,9 @@ def assess(
|
|
|
374
374
|
lambda values: eligible(values, keep=True), PERMISSIONS
|
|
375
375
|
)
|
|
376
376
|
row = Verdict(
|
|
377
|
-
REMOVE
|
|
377
|
+
REMOVE
|
|
378
|
+
if eligible(granted) or reason in (merged.MERGED, merged.STALE)
|
|
379
|
+
else KEEP,
|
|
378
380
|
wt.branch,
|
|
379
381
|
wt.path,
|
|
380
382
|
decided,
|
|
@@ -380,6 +380,39 @@ def test_keep_filter_preserves_ineligible_kept_rows(world):
|
|
|
380
380
|
assert all(r["verdict"] == "keep" and not r["eligible"] for r in result)
|
|
381
381
|
|
|
382
382
|
|
|
383
|
+
@pytest.mark.parametrize("detached", [False, True])
|
|
384
|
+
@pytest.mark.parametrize("permission", [False, True])
|
|
385
|
+
def test_empty_permission_sets_the_table_verdict_and_filter(
|
|
386
|
+
world, detached, permission
|
|
387
|
+
):
|
|
388
|
+
path = world.worktree("empty")
|
|
389
|
+
if detached:
|
|
390
|
+
world.git("checkout", "--quiet", "--detach", at=path)
|
|
391
|
+
locked = world.worktree("locked")
|
|
392
|
+
world.git("worktree", "lock", str(locked))
|
|
393
|
+
flags = ["--delete", "empty", "--delete", "reflog"] if permission else []
|
|
394
|
+
result = run(world, "gw prune", *flags, "--table")
|
|
395
|
+
assert result.returncode == 0, result.stderr
|
|
396
|
+
label = "(detached)" if detached else "empty"
|
|
397
|
+
line = next(line for line in result.stdout.splitlines() if label in line)
|
|
398
|
+
cells = [cell.strip() for cell in line.split("|")[1:-1]]
|
|
399
|
+
assert cells == [
|
|
400
|
+
label,
|
|
401
|
+
"remove" if permission else "keep",
|
|
402
|
+
"unused",
|
|
403
|
+
"yes" if permission else "no",
|
|
404
|
+
]
|
|
405
|
+
removable = rows(world, "gw prune", *flags, "--only", "remove")
|
|
406
|
+
assert [r["path"] for r in removable] == ([str(path)] if permission else [])
|
|
407
|
+
kept = rows(world, "gw prune", *flags, "--only", "keep")
|
|
408
|
+
assert {r["branch"] for r in kept} == (
|
|
409
|
+
{"main", "locked"}
|
|
410
|
+
if permission
|
|
411
|
+
else {"main", "locked", "" if detached else "empty"}
|
|
412
|
+
)
|
|
413
|
+
assert path.exists() and locked.exists()
|
|
414
|
+
|
|
415
|
+
|
|
383
416
|
@pytest.mark.parametrize(
|
|
384
417
|
"args",
|
|
385
418
|
[
|
|
@@ -38,7 +38,7 @@ def stash(world, path, subject="pending") -> str:
|
|
|
38
38
|
("empty", "empty", "stashes"),
|
|
39
39
|
],
|
|
40
40
|
)
|
|
41
|
-
def
|
|
41
|
+
def test_permissions_make_an_unused_verdict_removable(world, entry, values):
|
|
42
42
|
path = world.worktree("topic")
|
|
43
43
|
sha = stash(world, path)
|
|
44
44
|
if entry == "gw branch prune":
|
|
@@ -46,15 +46,37 @@ def test_permissions_combine_without_changing_an_unused_verdict(world, entry, va
|
|
|
46
46
|
args = [] if entry == "gw prune" else ["topic"]
|
|
47
47
|
for value in values:
|
|
48
48
|
args += ["--delete", value]
|
|
49
|
+
preview = run(
|
|
50
|
+
world,
|
|
51
|
+
entry,
|
|
52
|
+
*args,
|
|
53
|
+
"--json",
|
|
54
|
+
*(["--dry-run"] if entry == "gw branch prune" else []),
|
|
55
|
+
)
|
|
56
|
+
assert preview.returncode == 0, preview.stderr
|
|
57
|
+
row = next(
|
|
58
|
+
r for r in json.loads(preview.stdout)["verdicts"] if r["branch"] == "topic"
|
|
59
|
+
)
|
|
60
|
+
assert (row["verdict"], row["reason"], row["eligible"]) == (
|
|
61
|
+
"remove",
|
|
62
|
+
"unused",
|
|
63
|
+
True,
|
|
64
|
+
)
|
|
49
65
|
p = run(world, entry, *args, "--yes", "--json")
|
|
50
66
|
assert p.returncode == 0, p.stderr
|
|
51
67
|
assert not path.exists()
|
|
52
68
|
assert "topic" not in world.git("branch", "--format=%(refname:short)").splitlines()
|
|
53
69
|
assert not world.git("stash", "list")
|
|
54
70
|
assert sha in p.stderr
|
|
55
|
-
if entry
|
|
56
|
-
row =
|
|
57
|
-
|
|
71
|
+
if entry != "gw remove":
|
|
72
|
+
row = next(
|
|
73
|
+
r for r in json.loads(p.stdout)["verdicts"] if r["branch"] == "topic"
|
|
74
|
+
)
|
|
75
|
+
assert (row["verdict"], row["reason"], row["eligible"]) == (
|
|
76
|
+
"remove",
|
|
77
|
+
"unused",
|
|
78
|
+
True,
|
|
79
|
+
)
|
|
58
80
|
|
|
59
81
|
|
|
60
82
|
@pytest.mark.parametrize(
|
|
@@ -84,6 +106,23 @@ def test_invalid_permission_is_usage_before_repository_preflight(world, args):
|
|
|
84
106
|
assert world.git("rev-parse", "refs/heads/topic")
|
|
85
107
|
|
|
86
108
|
|
|
109
|
+
@pytest.mark.parametrize("entry", ["gw prune", "gw remove", "gw branch prune"])
|
|
110
|
+
@pytest.mark.parametrize("permission", ["empty", "stashes"])
|
|
111
|
+
def test_partial_permissions_keep_an_unused_verdict(world, entry, permission):
|
|
112
|
+
path = world.worktree("topic")
|
|
113
|
+
stash(world, path)
|
|
114
|
+
args = [] if entry == "gw prune" else ["topic"]
|
|
115
|
+
if entry == "gw branch prune":
|
|
116
|
+
world.git("worktree", "remove", str(path))
|
|
117
|
+
args += ["--dry-run"]
|
|
118
|
+
result = run(world, entry, *args, "--delete", permission, "--json")
|
|
119
|
+
assert result.returncode == 0, result.stderr
|
|
120
|
+
row = next(
|
|
121
|
+
r for r in json.loads(result.stdout)["verdicts"] if r["branch"] == "topic"
|
|
122
|
+
)
|
|
123
|
+
assert (row["verdict"], row["reason"], row["eligible"]) == ("keep", "unused", False)
|
|
124
|
+
|
|
125
|
+
|
|
87
126
|
@pytest.mark.parametrize("kind", ["empty", "unfinished", "finished", "main", "master"])
|
|
88
127
|
def test_keep_branch_keeps_ref_and_stashes_even_when_protected(world, kind):
|
|
89
128
|
path = (
|
|
@@ -100,6 +139,10 @@ def test_keep_branch_keeps_ref_and_stashes_even_when_protected(world, kind):
|
|
|
100
139
|
branch = kind if kind in ("main", "master") else "topic"
|
|
101
140
|
tip = world.git("rev-parse", "HEAD", at=path)
|
|
102
141
|
sha = stash(world, path)
|
|
142
|
+
preview = run(world, "gw remove", str(path), "--keep-branch", "--json")
|
|
143
|
+
assert preview.returncode == 0, preview.stderr
|
|
144
|
+
row = json.loads(preview.stdout)["verdicts"][0]
|
|
145
|
+
assert row["verdict"] == "remove" and row["eligible"]
|
|
103
146
|
p = run(world, "gw remove", str(path), "--keep-branch", "--yes", "--quiet")
|
|
104
147
|
assert p.returncode == 0, p.stderr
|
|
105
148
|
assert not path.exists()
|
|
@@ -12,4 +12,4 @@ autoload -Uz gw gwa gwbc gwbp gwbs gwff gwl gwm gwp 'gwp!' gwpa 'gwpa!' gwpu gwr
|
|
|
12
12
|
# The release this plugin came from, which `gw --help` and `gw version` compare
|
|
13
13
|
# with their own. Exported, because the environment is all a binary can see
|
|
14
14
|
# of the shell that started it.
|
|
15
|
-
export WORKTREES_PLUGIN_VERSION=0.13.
|
|
15
|
+
export WORKTREES_PLUGIN_VERSION=0.13.3
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{git_worktrees-0.13.2 → git_worktrees-0.13.3}/docs/plans/2026-11-05-worktree-pruning-design.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|