git-worktrees 0.11.1__tar.gz → 0.11.2__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.11.1 → git_worktrees-0.11.2}/AGENTS.md +4 -3
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/CHANGELOG.md +8 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/PKG-INFO +5 -5
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/README.md +4 -4
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/conf.d/worktrees.fish +1 -1
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/.claude-plugin/plugin.json +1 -1
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/.codex-plugin/plugin.json +1 -1
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/plugin.json +1 -1
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/pyproject.toml +1 -1
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/repo.py +0 -30
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_gates.py +0 -42
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/uv.lock +1 -1
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/worktrees.plugin.zsh +1 -1
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.claude/settings.json +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.codex/config.toml +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.github/workflows/codeql.yml +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.github/workflows/publish.yml +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.github/workflows/testpypi.yml +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.github/workflows/tests.yml +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.gitignore +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.pre-commit-config.yaml +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.python-version +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.releasetools.yaml +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/LICENSE +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/Makefile +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/completions/gw.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/completions/worktrees.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/BENCHMARK.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/DEVELOPMENT.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/REFERENCE.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/commands/branch-prune.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/commands/branch-status.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/commands/ci-checks.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/commands/fast-forward.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/commands/merge.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/plans/2026-11-05-worktree-pruning-design.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gw.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwa.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwbc.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwbp.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwbs.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwff.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwl.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwm.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwp!.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwp.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwpa!.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwpa.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwr!.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwr.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gws.fish +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/hatch_build.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/README.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/hooks/codex.json +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/hooks/hooks.json +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/session.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/ci-checks/SKILL.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/describe-pr/SKILL.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/describe-pr/format.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/fast-forward/SKILL.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/preflight/SKILL.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/preflight/agents/openai.yaml +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/preflight/rules.json +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/prune/SKILL.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/ship-it/SKILL.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/ship-it/rights.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/renovate.json +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/scripts/README.md +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/scripts/benchmark.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/scripts/bump_version.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/scripts/verify-publish.bash +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/__init__.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/branch_cli.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/branch_forge.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/branches.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/ci.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/cli.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/errors.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/fast_forward.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/forge.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/git.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/layout.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/merged.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/new_branch.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/pick.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/pr_merge.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/progress.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/prune.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/render.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/sync.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/verdicts.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/worktree.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/conftest.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_assessment.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_benchmark.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_branch_forge.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_branches.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_ci.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_cli.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_command_defaults.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_completions.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_fast_forward.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_fixture.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_forge.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_git_records.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_new_branch.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_partial_clone.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_path_boundaries.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_plugin.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_pr_merge.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_removal.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_render.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_shims.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_spec.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_sync.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_version.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_worktree.py +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/completions/_gw +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gw +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwa +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwbc +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwbp +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwbs +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwff +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwl +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwm +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwp +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwp! +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwpa +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwpa! +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwr +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwr! +0 -0
- {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gws +0 -0
|
@@ -593,9 +593,10 @@ the subcommands they are; `is_ancestor` beats `merge_base`, because
|
|
|
593
593
|
the caller wants.
|
|
594
594
|
|
|
595
595
|
A spec with `ok=` wide enough to swallow an error is a spec that has to be
|
|
596
|
-
tested on what it returns rather than on its exit code. `
|
|
597
|
-
`ok=(0,
|
|
598
|
-
|
|
596
|
+
tested on what it returns rather than on its exit code. `tree_of` takes
|
|
597
|
+
`ok=(0, 128)` for a ref that does not resolve, and a typo in its `^{tree}`
|
|
598
|
+
exits 128 too. The squash proof and the forge proof would then answer no for
|
|
599
|
+
every branch, and nothing would fail.
|
|
599
600
|
|
|
600
601
|
The network calls belong to sync. Their results distinguish failed
|
|
601
602
|
refs refresh from partial forge refresh; assessments retain usable local
|
|
@@ -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.11.2 - 2026-11-15
|
|
21
|
+
|
|
22
|
+
### Removed
|
|
23
|
+
|
|
24
|
+
`gw --explain` no longer lists `rev-parse --abbrev-ref
|
|
25
|
+
--symbolic-full-name $branch@{upstream}` or `for-each-ref
|
|
26
|
+
--format=%(upstream:track)`. No command ran either of them.
|
|
27
|
+
|
|
20
28
|
## 0.11.1 - 2026-11-15
|
|
21
29
|
|
|
22
30
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: git-worktrees
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.2
|
|
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
|
|
@@ -104,7 +104,7 @@ the plugin's tag to the same release, as each manager below describes.
|
|
|
104
104
|
### fish
|
|
105
105
|
|
|
106
106
|
```console
|
|
107
|
-
fisher install MihaiBojin/worktrees@v0.11.
|
|
107
|
+
fisher install MihaiBojin/worktrees@v0.11.2
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
Fisher copies `functions/`, `completions/` and `conf.d/` from the repository
|
|
@@ -121,7 +121,7 @@ the untagged one holds the files.
|
|
|
121
121
|
Antidote takes a `path:` into the repository, and `branch:` takes a tag:
|
|
122
122
|
|
|
123
123
|
```
|
|
124
|
-
MihaiBojin/worktrees branch:v0.11.
|
|
124
|
+
MihaiBojin/worktrees branch:v0.11.2 path:zsh/plugins/worktrees # in zsh_plugins.txt
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
The plugin puts its own `functions/` and `completions/` on `fpath` and
|
|
@@ -196,8 +196,8 @@ its stdout stays the version alone for a script to read.
|
|
|
196
196
|
An excerpt of `gw --help`'s release lines with matching CLI and shell releases:
|
|
197
197
|
|
|
198
198
|
```console
|
|
199
|
-
worktrees 0.11.
|
|
200
|
-
The shell plugin here is 0.11.
|
|
199
|
+
worktrees 0.11.2: git worktree commands that refuse to lose work
|
|
200
|
+
The shell plugin here is 0.11.2, the same release as these commands.
|
|
201
201
|
```
|
|
202
202
|
|
|
203
203
|
A shell without the variable has no plugin loaded, or one older than the
|
|
@@ -77,7 +77,7 @@ the plugin's tag to the same release, as each manager below describes.
|
|
|
77
77
|
### fish
|
|
78
78
|
|
|
79
79
|
```console
|
|
80
|
-
fisher install MihaiBojin/worktrees@v0.11.
|
|
80
|
+
fisher install MihaiBojin/worktrees@v0.11.2
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
Fisher copies `functions/`, `completions/` and `conf.d/` from the repository
|
|
@@ -94,7 +94,7 @@ the untagged one holds the files.
|
|
|
94
94
|
Antidote takes a `path:` into the repository, and `branch:` takes a tag:
|
|
95
95
|
|
|
96
96
|
```
|
|
97
|
-
MihaiBojin/worktrees branch:v0.11.
|
|
97
|
+
MihaiBojin/worktrees branch:v0.11.2 path:zsh/plugins/worktrees # in zsh_plugins.txt
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
The plugin puts its own `functions/` and `completions/` on `fpath` and
|
|
@@ -169,8 +169,8 @@ its stdout stays the version alone for a script to read.
|
|
|
169
169
|
An excerpt of `gw --help`'s release lines with matching CLI and shell releases:
|
|
170
170
|
|
|
171
171
|
```console
|
|
172
|
-
worktrees 0.11.
|
|
173
|
-
The shell plugin here is 0.11.
|
|
172
|
+
worktrees 0.11.2: git worktree commands that refuse to lose work
|
|
173
|
+
The shell plugin here is 0.11.2, the same release as these commands.
|
|
174
174
|
```
|
|
175
175
|
|
|
176
176
|
A shell without the variable has no plugin loaded, or one older than the
|
|
@@ -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.11.
|
|
7
|
+
set -gx WORKTREES_PLUGIN_VERSION 0.11.2
|
|
@@ -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.11.
|
|
4
|
+
"version": "0.11.2",
|
|
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.11.
|
|
12
|
+
version = "0.11.2"
|
|
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.
|
|
@@ -156,18 +156,6 @@ def refs_containing(sha: str) -> None:
|
|
|
156
156
|
"""One ref reaching this commit, or nothing."""
|
|
157
157
|
|
|
158
158
|
|
|
159
|
-
# @{upstream} survives the spec: braces are git's revision syntax, not a
|
|
160
|
-
# placeholder, which is why placeholders are spelled with $.
|
|
161
|
-
@git("rev-parse --abbrev-ref --symbolic-full-name $branch@{upstream}", ok=(0, 1, 128))
|
|
162
|
-
def upstream_of(branch: str) -> None:
|
|
163
|
-
"""The upstream a branch tracks. Failure means unknown, not none."""
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
@git("for-each-ref --format=%(upstream:track) refs/heads/$branch")
|
|
167
|
-
def upstream_tracking(branch: str) -> None:
|
|
168
|
-
"""Tracking status, including [gone] for a missing configured upstream."""
|
|
169
|
-
|
|
170
|
-
|
|
171
159
|
@git("rev-list --count $a..$b", ok=(0, 128))
|
|
172
160
|
def count_between(a: str, b: str) -> None:
|
|
173
161
|
"""How many commits b has that a does not."""
|
|
@@ -559,21 +547,3 @@ def ignored_groups(path: str, ignored: list[str]) -> list[str]:
|
|
|
559
547
|
last = patterns.get(name, "").rstrip("/").rpartition("/")[2]
|
|
560
548
|
shown.add(f"{parent}/" if parent and last in ("*", "**") else name)
|
|
561
549
|
return sorted(shown)
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
def unpushed_count(
|
|
565
|
-
branch: str, repo: str | os.PathLike[str] | None = None
|
|
566
|
-
) -> int | None:
|
|
567
|
-
"""Commits the upstream has not got, or None when there is no upstream.
|
|
568
|
-
|
|
569
|
-
None is not zero. Branches made here do not track, so "no upstream" is the
|
|
570
|
-
normal state, and reporting zero would quietly disarm the guard for
|
|
571
|
-
exactly those.
|
|
572
|
-
"""
|
|
573
|
-
up = upstream_of(branch, repo=repo)
|
|
574
|
-
if not up or not up.value:
|
|
575
|
-
return None
|
|
576
|
-
counted = count_between(up.value, f"refs/heads/{branch}", repo=repo)
|
|
577
|
-
if not counted:
|
|
578
|
-
return None
|
|
579
|
-
return int(counted.out.strip() or 0)
|
|
@@ -589,48 +589,6 @@ def test_no_unexpected_git_command_ran(world) -> None:
|
|
|
589
589
|
assert subcommand(argv) in declared, f"unregistered: {' '.join(argv)}"
|
|
590
590
|
|
|
591
591
|
|
|
592
|
-
# --------------------------------------------------------------------------
|
|
593
|
-
# a branch that is pushed is not `unknown`
|
|
594
|
-
# --------------------------------------------------------------------------
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
def test_a_tracked_branch_reports_a_count_not_none(world) -> None:
|
|
598
|
-
"""`unpushed_count` returning None means "no upstream", and a broken
|
|
599
|
-
`upstream_of` returns None too. Every branch then reads as `unknown` and
|
|
600
|
-
nothing fails, because `ok=(0, 1, 128)` swallows the error.
|
|
601
|
-
"""
|
|
602
|
-
upstream = world.root / "upstream.git"
|
|
603
|
-
world.git("init", "--bare", "--quiet", str(upstream), at=world.repo)
|
|
604
|
-
world.git("remote", "add", "origin", str(upstream))
|
|
605
|
-
world.git("push", "--quiet", "--set-upstream", "origin", "main")
|
|
606
|
-
|
|
607
|
-
world.git("switch", "--quiet", "--create", "pushed")
|
|
608
|
-
world.commit("p.txt", "p\n")
|
|
609
|
-
world.git("push", "--quiet", "--set-upstream", "origin", "pushed")
|
|
610
|
-
|
|
611
|
-
assert R.unpushed_count("pushed") == 0
|
|
612
|
-
|
|
613
|
-
world.commit("q.txt", "q\n")
|
|
614
|
-
assert R.unpushed_count("pushed") == 1
|
|
615
|
-
|
|
616
|
-
world.git("switch", "--quiet", "--create", "untracked", "main")
|
|
617
|
-
assert R.unpushed_count("untracked") is None
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
def test_the_upstream_spec_is_a_flag_git_accepts(world) -> None:
|
|
621
|
-
"""The spec reaches git verbatim, so a typo in a flag is a typo in the
|
|
622
|
-
command. This asserts on what came back rather than on the exit code.
|
|
623
|
-
"""
|
|
624
|
-
upstream = world.root / "up2.git"
|
|
625
|
-
world.git("init", "--bare", "--quiet", str(upstream), at=world.repo)
|
|
626
|
-
world.git("remote", "add", "origin", str(upstream))
|
|
627
|
-
world.git("push", "--quiet", "--set-upstream", "origin", "main")
|
|
628
|
-
|
|
629
|
-
out = R.upstream_of("main")
|
|
630
|
-
assert out, "upstream_of failed; the spec is not a command git accepts"
|
|
631
|
-
assert out.out.strip() == "origin/main"
|
|
632
|
-
|
|
633
|
-
|
|
634
592
|
# --------------------------------------------------------------------------
|
|
635
593
|
# one git status per worktree, not two
|
|
636
594
|
# --------------------------------------------------------------------------
|
|
@@ -12,4 +12,4 @@ autoload -Uz gw gwa gwbc gwbp gwbs gwff gwl gwm gwp 'gwp!' gwpa 'gwpa!' gwr '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.11.
|
|
15
|
+
export WORKTREES_PLUGIN_VERSION=0.11.2
|
|
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.11.1 → git_worktrees-0.11.2}/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
|