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.
Files changed (133) hide show
  1. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/AGENTS.md +4 -3
  2. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/CHANGELOG.md +8 -0
  3. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/PKG-INFO +5 -5
  4. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/README.md +4 -4
  5. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/conf.d/worktrees.fish +1 -1
  6. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/.claude-plugin/plugin.json +1 -1
  7. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/.codex-plugin/plugin.json +1 -1
  8. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/plugin.json +1 -1
  9. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/pyproject.toml +1 -1
  10. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/repo.py +0 -30
  11. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_gates.py +0 -42
  12. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/uv.lock +1 -1
  13. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/worktrees.plugin.zsh +1 -1
  14. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.claude/settings.json +0 -0
  15. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.codex/config.toml +0 -0
  16. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.github/workflows/codeql.yml +0 -0
  17. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.github/workflows/publish.yml +0 -0
  18. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.github/workflows/testpypi.yml +0 -0
  19. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.github/workflows/tests.yml +0 -0
  20. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.gitignore +0 -0
  21. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.pre-commit-config.yaml +0 -0
  22. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.python-version +0 -0
  23. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/.releasetools.yaml +0 -0
  24. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/LICENSE +0 -0
  25. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/Makefile +0 -0
  26. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/completions/gw.fish +0 -0
  27. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/completions/worktrees.fish +0 -0
  28. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/BENCHMARK.md +0 -0
  29. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/DEVELOPMENT.md +0 -0
  30. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/REFERENCE.md +0 -0
  31. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/commands/branch-prune.md +0 -0
  32. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/commands/branch-status.md +0 -0
  33. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/commands/ci-checks.md +0 -0
  34. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/commands/fast-forward.md +0 -0
  35. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/commands/merge.md +0 -0
  36. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/docs/plans/2026-11-05-worktree-pruning-design.md +0 -0
  37. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gw.fish +0 -0
  38. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwa.fish +0 -0
  39. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwbc.fish +0 -0
  40. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwbp.fish +0 -0
  41. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwbs.fish +0 -0
  42. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwff.fish +0 -0
  43. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwl.fish +0 -0
  44. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwm.fish +0 -0
  45. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwp!.fish +0 -0
  46. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwp.fish +0 -0
  47. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwpa!.fish +0 -0
  48. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwpa.fish +0 -0
  49. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwr!.fish +0 -0
  50. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gwr.fish +0 -0
  51. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/functions/gws.fish +0 -0
  52. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/hatch_build.py +0 -0
  53. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/README.md +0 -0
  54. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/hooks/codex.json +0 -0
  55. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/hooks/hooks.json +0 -0
  56. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/session.md +0 -0
  57. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/ci-checks/SKILL.md +0 -0
  58. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/describe-pr/SKILL.md +0 -0
  59. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/describe-pr/format.md +0 -0
  60. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/fast-forward/SKILL.md +0 -0
  61. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/preflight/SKILL.md +0 -0
  62. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/preflight/agents/openai.yaml +0 -0
  63. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/preflight/rules.json +0 -0
  64. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/prune/SKILL.md +0 -0
  65. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/ship-it/SKILL.md +0 -0
  66. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/plugin/skills/ship-it/rights.md +0 -0
  67. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/renovate.json +0 -0
  68. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/scripts/README.md +0 -0
  69. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/scripts/benchmark.py +0 -0
  70. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/scripts/bump_version.py +0 -0
  71. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/scripts/verify-publish.bash +0 -0
  72. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/__init__.py +0 -0
  73. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/branch_cli.py +0 -0
  74. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/branch_forge.py +0 -0
  75. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/branches.py +0 -0
  76. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/ci.py +0 -0
  77. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/cli.py +0 -0
  78. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/errors.py +0 -0
  79. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/fast_forward.py +0 -0
  80. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/forge.py +0 -0
  81. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/git.py +0 -0
  82. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/layout.py +0 -0
  83. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/merged.py +0 -0
  84. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/new_branch.py +0 -0
  85. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/pick.py +0 -0
  86. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/pr_merge.py +0 -0
  87. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/progress.py +0 -0
  88. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/prune.py +0 -0
  89. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/render.py +0 -0
  90. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/sync.py +0 -0
  91. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/verdicts.py +0 -0
  92. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/src/worktrees/worktree.py +0 -0
  93. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/conftest.py +0 -0
  94. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_assessment.py +0 -0
  95. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_benchmark.py +0 -0
  96. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_branch_forge.py +0 -0
  97. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_branches.py +0 -0
  98. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_ci.py +0 -0
  99. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_cli.py +0 -0
  100. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_command_defaults.py +0 -0
  101. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_completions.py +0 -0
  102. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_fast_forward.py +0 -0
  103. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_fixture.py +0 -0
  104. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_forge.py +0 -0
  105. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_git_records.py +0 -0
  106. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_new_branch.py +0 -0
  107. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_partial_clone.py +0 -0
  108. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_path_boundaries.py +0 -0
  109. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_plugin.py +0 -0
  110. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_pr_merge.py +0 -0
  111. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_removal.py +0 -0
  112. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_render.py +0 -0
  113. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_shims.py +0 -0
  114. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_spec.py +0 -0
  115. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_sync.py +0 -0
  116. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_version.py +0 -0
  117. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/tests/test_worktree.py +0 -0
  118. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/completions/_gw +0 -0
  119. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gw +0 -0
  120. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwa +0 -0
  121. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwbc +0 -0
  122. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwbp +0 -0
  123. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwbs +0 -0
  124. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwff +0 -0
  125. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwl +0 -0
  126. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwm +0 -0
  127. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwp +0 -0
  128. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwp! +0 -0
  129. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwpa +0 -0
  130. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwpa! +0 -0
  131. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwr +0 -0
  132. {git_worktrees-0.11.1 → git_worktrees-0.11.2}/zsh/plugins/worktrees/functions/gwr! +0 -0
  133. {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. `upstream_of` takes
597
- `ok=(0, 1, 128)`, so a typo in one of its flags exits 128, reads as "no
598
- upstream", and turns every branch into `unknown` with nothing failing.
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.1
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.1
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.1 path:zsh/plugins/worktrees # in zsh_plugins.txt
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.1: git worktree commands that refuse to lose work
200
- The shell plugin here is 0.11.1, the same release as these commands.
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.1
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.1 path:zsh/plugins/worktrees # in zsh_plugins.txt
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.1: git worktree commands that refuse to lose work
173
- The shell plugin here is 0.11.1, the same release as these commands.
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.1
7
+ set -gx WORKTREES_PLUGIN_VERSION 0.11.2
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worktrees",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Read CI, rebase onto the head branch, describe, ship and merge pull requests, and prune finished worktrees through the worktrees CLI",
5
5
  "author": {
6
6
  "name": "Mihai Bojin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worktrees",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Read CI, rebase onto the head branch, describe, ship and merge pull requests, and prune finished worktrees through the worktrees CLI",
5
5
  "author": {
6
6
  "name": "Mihai Bojin",
@@ -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.1",
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.1"
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
  # --------------------------------------------------------------------------
@@ -49,7 +49,7 @@ wheels = [
49
49
 
50
50
  [[package]]
51
51
  name = "git-worktrees"
52
- version = "0.11.1"
52
+ version = "0.11.2"
53
53
  source = { editable = "." }
54
54
 
55
55
  [package.optional-dependencies]
@@ -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.1
15
+ export WORKTREES_PLUGIN_VERSION=0.11.2
File without changes
File without changes