git-worktrees 0.8.0__tar.gz → 0.10.0__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.8.0 → git_worktrees-0.10.0}/.claude/settings.json +0 -1
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/.codex/config.toml +0 -3
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/.github/workflows/publish.yml +89 -16
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/.releasetools.yaml +3 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/AGENTS.md +62 -25
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/CHANGELOG.md +108 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/Makefile +9 -13
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/PKG-INFO +49 -23
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/README.md +48 -22
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/completions/gw.fish +7 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/conf.d/worktrees.fish +1 -1
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/docs/DEVELOPMENT.md +39 -22
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/docs/REFERENCE.md +29 -14
- git_worktrees-0.10.0/docs/commands/ci-checks.md +37 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/docs/commands/fast-forward.md +48 -15
- git_worktrees-0.10.0/docs/commands/merge.md +93 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/plugin/.claude-plugin/plugin.json +1 -1
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/plugin/.codex-plugin/plugin.json +1 -1
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/plugin/README.md +39 -24
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/plugin/plugin.json +1 -1
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/plugin/skills/ci-checks/SKILL.md +7 -1
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/plugin/skills/fast-forward/SKILL.md +7 -1
- git_worktrees-0.10.0/plugin/skills/preflight/SKILL.md +96 -0
- git_worktrees-0.10.0/plugin/skills/preflight/agents/openai.yaml +2 -0
- git_worktrees-0.10.0/plugin/skills/preflight/rules.json +27 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/plugin/skills/prune/SKILL.md +2 -2
- git_worktrees-0.10.0/plugin/skills/ship-it/SKILL.md +448 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/plugin/skills/ship-it/rights.md +25 -46
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/pyproject.toml +1 -1
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/branch_cli.py +4 -4
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/branch_forge.py +65 -5
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/branches.py +16 -8
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/ci.py +72 -2
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/cli.py +126 -23
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/fast_forward.py +188 -24
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/forge.py +45 -12
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/merged.py +2 -2
- git_worktrees-0.10.0/src/worktrees/pr_merge.py +338 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/prune.py +21 -5
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/render.py +27 -8
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/repo.py +16 -17
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/verdicts.py +67 -18
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/conftest.py +31 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_assessment.py +4 -2
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_branch_forge.py +36 -5
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_ci.py +153 -1
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_cli.py +116 -1
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_fast_forward.py +386 -2
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_forge.py +5 -6
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_gates.py +78 -12
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_git_records.py +2 -2
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_plugin.py +154 -11
- git_worktrees-0.10.0/tests/test_pr_merge.py +721 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_render.py +29 -1
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_sync.py +27 -6
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/uv.lock +12 -11
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/completions/_gw +11 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/worktrees.plugin.zsh +1 -1
- git_worktrees-0.8.0/plugin/skills/merge/SKILL.md +0 -193
- git_worktrees-0.8.0/plugin/skills/ship-it/SKILL.md +0 -230
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/.github/workflows/codeql.yml +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/.github/workflows/testpypi.yml +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/.github/workflows/tests.yml +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/.gitignore +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/.pre-commit-config.yaml +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/.python-version +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/LICENSE +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/completions/worktrees.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/docs/BENCHMARK.md +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/docs/commands/branch-prune.md +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/docs/commands/branch-status.md +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/docs/plans/2026-11-05-worktree-pruning-design.md +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gw.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwa.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwbc.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwbp.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwbs.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwff.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwl.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwm.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwp!.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwp.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwpa!.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwpa.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwr!.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gwr.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/functions/gws.fish +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/hatch_build.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/plugin/skills/describe-pr/SKILL.md +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/plugin/skills/describe-pr/format.md +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/plugin/skills/new-branch/SKILL.md +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/renovate.json +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/scripts/README.md +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/scripts/benchmark.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/scripts/bump_version.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/scripts/verify-publish.bash +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/__init__.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/errors.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/git.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/layout.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/new_branch.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/pick.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/progress.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/sync.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/src/worktrees/worktree.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_benchmark.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_branches.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_command_defaults.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_completions.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_fixture.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_new_branch.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_partial_clone.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_path_boundaries.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_removal.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_shims.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_spec.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_version.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/tests/test_worktree.py +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gw +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwa +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwbc +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwbp +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwbs +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwff +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwl +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwm +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwp +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwp! +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwpa +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwpa! +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwr +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gwr! +0 -0
- {git_worktrees-0.8.0 → git_worktrees-0.10.0}/zsh/plugins/worktrees/functions/gws +0 -0
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
name: Publish
|
|
2
|
+
run-name: Release ${{ inputs.version && format('v{0}', inputs.version) || github.ref_name }}
|
|
2
3
|
|
|
3
4
|
# Renaming this file breaks publishing. PyPI's Trusted Publishing matches a
|
|
4
5
|
# request against the repository, this workflow's FILENAME and the environment,
|
|
5
6
|
# so a rename means re-registering the publisher on PyPI first.
|
|
6
7
|
#
|
|
7
|
-
# build -> publish -> release
|
|
8
|
-
#
|
|
8
|
+
# build -> tag -> publish -> release
|
|
9
|
+
# \-> verify
|
|
9
10
|
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
11
|
+
# A release is a version bump merged into main, then published one of two
|
|
12
|
+
# ways, as .releasetools.yaml's release.trigger lists them. Pushing the signed
|
|
13
|
+
# tag v<version> on the release commit starts this workflow. Or a dispatch
|
|
14
|
+
# names the version and the release commit, and the tag job creates the tag
|
|
15
|
+
# once build has passed, before anything is uploaded. Either way the
|
|
16
|
+
# irreversible step is the last one and everything before it is a normal
|
|
17
|
+
# reviewed change.
|
|
13
18
|
#
|
|
14
19
|
# There is no TestPyPI rehearsal. testpypi.yml publishes every commit on main
|
|
15
20
|
# there as <version>.post<epoch> and installs it back, so the tree this tag
|
|
@@ -24,13 +29,23 @@ on:
|
|
|
24
29
|
push:
|
|
25
30
|
tags:
|
|
26
31
|
- "v*.*.*"
|
|
27
|
-
# To re-run a release whose publish failed. Run it against a tag ref, not a
|
|
28
|
-
# branch: every guard below reads the tag at HEAD.
|
|
29
32
|
workflow_dispatch:
|
|
33
|
+
inputs:
|
|
34
|
+
version:
|
|
35
|
+
description: "The version to release, with no v (e.g. 0.9.1). The tag is v<version>."
|
|
36
|
+
required: true
|
|
37
|
+
commit:
|
|
38
|
+
description: "The release commit: its full SHA, or HEAD for whatever the dispatched ref names when the run starts."
|
|
39
|
+
required: false
|
|
40
|
+
default: HEAD
|
|
30
41
|
|
|
31
42
|
permissions:
|
|
32
43
|
contents: read
|
|
33
44
|
|
|
45
|
+
env:
|
|
46
|
+
# The tag this run releases: the one pushed, or the one a dispatch creates.
|
|
47
|
+
TAG: ${{ inputs.version && format('v{0}', inputs.version) || github.ref_name }}
|
|
48
|
+
|
|
34
49
|
jobs:
|
|
35
50
|
# Built once and handed to every job below, so what reaches PyPI is
|
|
36
51
|
# byte-for-byte what was tested and installed here.
|
|
@@ -61,16 +76,49 @@ jobs:
|
|
|
61
76
|
- name: Install the release tools
|
|
62
77
|
uses: releasetools/cli@v0
|
|
63
78
|
|
|
64
|
-
#
|
|
65
|
-
#
|
|
66
|
-
#
|
|
67
|
-
#
|
|
68
|
-
#
|
|
79
|
+
# The guards, cheapest first. A dispatched run builds whatever its ref
|
|
80
|
+
# names when it starts, so it has to be the commit the dispatch named,
|
|
81
|
+
# and the tag it would create must not exist yet. The tag has to name a
|
|
82
|
+
# version the repository actually carries, that version has to have a
|
|
83
|
+
# changelog entry, the commit has to be one main took, and its tests
|
|
84
|
+
# have to have passed already. All of them here in build, because the
|
|
85
|
+
# release job runs after the PyPI upload and a refusal there would be
|
|
86
|
+
# too late.
|
|
87
|
+
- name: Refuse a commit other than the release commit
|
|
88
|
+
if: github.event_name == 'workflow_dispatch'
|
|
89
|
+
env:
|
|
90
|
+
COMMIT: ${{ inputs.commit }}
|
|
91
|
+
run: |
|
|
92
|
+
if [ "$COMMIT" != HEAD ] && [ "$COMMIT" != "$GITHUB_SHA" ]; then
|
|
93
|
+
echo "::error::asked to release $COMMIT, but $GITHUB_REF_NAME is at $GITHUB_SHA"
|
|
94
|
+
exit 1
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
- name: Refuse a version already tagged
|
|
98
|
+
if: github.event_name == 'workflow_dispatch'
|
|
99
|
+
env:
|
|
100
|
+
GH_TOKEN: ${{ github.token }} # no runner default
|
|
101
|
+
run: |
|
|
102
|
+
if gh api "repos/$GITHUB_REPOSITORY/git/ref/tags/$TAG" >/dev/null 2>&1; then
|
|
103
|
+
echo "::error::$TAG already exists"
|
|
104
|
+
exit 1
|
|
105
|
+
fi
|
|
106
|
+
|
|
69
107
|
- name: Check the tag matches the project version
|
|
108
|
+
if: github.event_name == 'push'
|
|
70
109
|
run: rt git::assert_tag_version "$(uv version --short)"
|
|
71
110
|
|
|
111
|
+
- name: Check the dispatched version is the project version
|
|
112
|
+
if: github.event_name == 'workflow_dispatch'
|
|
113
|
+
run: |
|
|
114
|
+
DECLARED="v$(uv version --short)"
|
|
115
|
+
if [ "$DECLARED" != "$TAG" ]; then
|
|
116
|
+
echo "::error::pyproject.toml declares $DECLARED, not $TAG"
|
|
117
|
+
exit 1
|
|
118
|
+
fi
|
|
119
|
+
|
|
72
120
|
- name: Check the changelog has an entry for it
|
|
73
|
-
run: rt changelog::section "${
|
|
121
|
+
run: rt changelog::section "${TAG#v}" >/dev/null
|
|
74
122
|
|
|
75
123
|
# github:: rather than git::, because this checkout is shallow and
|
|
76
124
|
# merge-base answers from the history it has: on a truncated one it
|
|
@@ -100,7 +148,7 @@ jobs:
|
|
|
100
148
|
- name: Install fish and zsh
|
|
101
149
|
run: sudo apt-get update && sudo apt-get install -y fish zsh
|
|
102
150
|
|
|
103
|
-
#
|
|
151
|
+
# This run is the last chance to catch a regression, so both suites run.
|
|
104
152
|
- name: Run tests
|
|
105
153
|
run: |
|
|
106
154
|
uv run --no-sync pytest tests -q
|
|
@@ -127,10 +175,32 @@ jobs:
|
|
|
127
175
|
path: dist/
|
|
128
176
|
if-no-files-found: error
|
|
129
177
|
|
|
178
|
+
# A dispatch tags the release commit here, after every guard and before the
|
|
179
|
+
# upload, so a second dispatch of the same version stops at this step. The
|
|
180
|
+
# tag is made with this run's GITHUB_TOKEN, which starts no workflow, so it
|
|
181
|
+
# does not start this one a second time. A pushed tag skips this job.
|
|
182
|
+
tag:
|
|
183
|
+
name: Tag the release commit
|
|
184
|
+
if: github.event_name == 'workflow_dispatch'
|
|
185
|
+
runs-on: ubuntu-24.04
|
|
186
|
+
needs: build
|
|
187
|
+
permissions:
|
|
188
|
+
contents: write
|
|
189
|
+
steps:
|
|
190
|
+
- name: Create the tag
|
|
191
|
+
env:
|
|
192
|
+
GH_TOKEN: ${{ github.token }} # no runner default
|
|
193
|
+
run: >-
|
|
194
|
+
gh api --method POST "repos/$GITHUB_REPOSITORY/git/refs"
|
|
195
|
+
-f "ref=refs/tags/$TAG" -f "sha=$GITHUB_SHA"
|
|
196
|
+
|
|
130
197
|
publish:
|
|
131
198
|
name: Publish to PyPI
|
|
132
199
|
runs-on: ubuntu-24.04
|
|
133
|
-
needs: build
|
|
200
|
+
needs: [build, tag]
|
|
201
|
+
# A pushed tag skips the tag job, and a job whose needs include a skipped
|
|
202
|
+
# one is skipped too unless its condition says otherwise.
|
|
203
|
+
if: ${{ !cancelled() && needs.build.result == 'success' && needs.tag.result != 'failure' }}
|
|
134
204
|
# Binds this job to the trusted publisher registered for `pypi`. Add a
|
|
135
205
|
# required reviewer on this environment for a manual gate before anything
|
|
136
206
|
# reaches the real index.
|
|
@@ -172,6 +242,7 @@ jobs:
|
|
|
172
242
|
matrix:
|
|
173
243
|
os: [ubuntu-24.04, ubuntu-26.04]
|
|
174
244
|
needs: publish
|
|
245
|
+
if: ${{ !cancelled() && needs.publish.result == 'success' }}
|
|
175
246
|
permissions:
|
|
176
247
|
contents: read
|
|
177
248
|
steps:
|
|
@@ -221,6 +292,7 @@ jobs:
|
|
|
221
292
|
name: Release
|
|
222
293
|
runs-on: ubuntu-24.04
|
|
223
294
|
needs: publish
|
|
295
|
+
if: ${{ !cancelled() && needs.publish.result == 'success' }}
|
|
224
296
|
permissions:
|
|
225
297
|
contents: write
|
|
226
298
|
steps:
|
|
@@ -233,10 +305,11 @@ jobs:
|
|
|
233
305
|
# What was written for this version, not a list of pull request titles.
|
|
234
306
|
# build already proved the section exists, before anything was published.
|
|
235
307
|
- name: Read the changelog entry
|
|
236
|
-
run: rt changelog::section "${
|
|
308
|
+
run: rt changelog::section "${TAG#v}" >RELEASE_NOTES.md
|
|
237
309
|
|
|
238
310
|
- name: Release
|
|
239
311
|
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3
|
|
240
312
|
with:
|
|
313
|
+
tag_name: ${{ env.TAG }}
|
|
241
314
|
body_path: RELEASE_NOTES.md
|
|
242
315
|
make_latest: true
|
|
@@ -22,4 +22,7 @@ release:
|
|
|
22
22
|
merge: squash
|
|
23
23
|
checks: tests.yml
|
|
24
24
|
publish: publish.yml
|
|
25
|
+
# A pushed signed tag starts publish.yml, or a dispatch with the version
|
|
26
|
+
# and the release commit does and publish.yml creates the tag.
|
|
27
|
+
trigger: [tag, dispatch]
|
|
25
28
|
registry: https://pypi.org/pypi/git-worktrees/{version}/json
|
|
@@ -100,6 +100,16 @@ squash holds more than the two share, so no local proof marks the shared
|
|
|
100
100
|
part; `branch_forge.carried_by` asks the forge which merged request carried
|
|
101
101
|
the branch's oldest commit, and that request's commit list marks it, read
|
|
102
102
|
from one page of 100 by choice: a parent seldom drifts further.
|
|
103
|
+
GitHub rewrites that stacked branch's remote copy itself when the parent
|
|
104
|
+
merges, so the branch takes the copy instead, through `_rewritten`: no
|
|
105
|
+
commit in the branch's reflog may reach it, which is when
|
|
106
|
+
`--force-if-includes` refuses the push, and its patch-ids must be the
|
|
107
|
+
branch's own, in order. A copy the branch's own push left is in that reflog,
|
|
108
|
+
so a branch rebased here after its push keeps its newer commits. A run
|
|
109
|
+
before the rewrite arrives finds the copy still holding the merged part;
|
|
110
|
+
when `branch_forge.in_stack` says the open pull request is in a native
|
|
111
|
+
stack, `_awaited` fetches every `REWRITE_INTERVAL` seconds until it
|
|
112
|
+
arrives, and refuses, with the offline command, after `REWRITE_WAIT`.
|
|
103
113
|
Once a carry finishes, each stash made after the merged part moves to the
|
|
104
114
|
replayed copy of its commit, matched by patch-id:
|
|
105
115
|
`git merge-tree --write-tree` re-bases it without touching the checkout,
|
|
@@ -188,25 +198,28 @@ assumes a plugin root or a checkout at a known path.
|
|
|
188
198
|
| `fast-forward` | `gw fast-forward --autostash --json`, then each rebase conflict until the branch is level |
|
|
189
199
|
| `ci-checks` | `gw ci-checks --json`, `--wait` to wait without polling |
|
|
190
200
|
| `describe-pr` | checks a review's title and body against its diff, and edits them |
|
|
191
|
-
| `merge` | `describe-pr`, `ci-checks`, fixes on the branch, `gh pr merge`, then `fast-forward` in the head branch's checkout |
|
|
192
201
|
| `prune` | `gw prune --json` and `gw branch status --json`, then the removals approved |
|
|
193
|
-
| `ship-it` | commits, `fast-forward`, a leased or plain push, `gh pr create`, `describe-pr`, the merge
|
|
202
|
+
| `ship-it` | commits, `fast-forward`, a leased or plain push, `gh pr create`, `describe-pr`, `ci-checks`, fixes on the branch, `gw merge` on GitHub or `glab mr merge` on GitLab, then `fast-forward` in the head branch's checkout, unassisted, for this checkout or each branch it is named; given numbers, those open reviews from `ci-checks` on |
|
|
203
|
+
| `preflight` | `jq` merges `preflight/rules.json` into the user's or the project's `.claude/settings.json`, after asking |
|
|
194
204
|
|
|
195
|
-
`describe-pr
|
|
205
|
+
`describe-pr` and `ship-it` share `describe-pr/format.md`: the
|
|
196
206
|
review's title and body are the squash commit's subject and body, so one set
|
|
197
207
|
of rules writes both. `tests/test_plugin.py` holds every skill's
|
|
198
208
|
`allowed-tools` to reads, `gw sync` and `gw branch create`: no pattern
|
|
199
209
|
covers a removal, a merge, a push, a rerun or a checkout that moves. Three
|
|
200
210
|
exceptions are each skill's job: `describe-pr` may edit a review,
|
|
201
211
|
`fast-forward` runs `gw fast-forward` and the conflict loop its own test
|
|
202
|
-
lists, and `ship-it`, invoked to publish one change
|
|
203
|
-
and edits the review, reruns CI and merges,
|
|
204
|
-
pre-approves a removal.
|
|
212
|
+
lists, and `ship-it`, invoked to publish one change or the reviews it
|
|
213
|
+
names, commits, pushes, opens and edits the review, reruns CI and merges,
|
|
214
|
+
as its own test lists. None pre-approves a removal.
|
|
205
215
|
|
|
206
216
|
A plugin cannot grant a skill more than the turn that invoked it in Claude
|
|
207
217
|
Code, and nothing at all in Codex, so `ship-it/rights.md` lists the rules a
|
|
208
218
|
user adds to their own client configuration, and the skill checks for them
|
|
209
|
-
before it starts.
|
|
219
|
+
before it starts. The Claude Code ones live once, in `preflight/rules.json`,
|
|
220
|
+
which `preflight` merges into the settings file the user names. It runs only
|
|
221
|
+
when called by name, in both clients, and pre-approves no write, so the copy
|
|
222
|
+
over the settings file reaches the client's own prompt. Its allow patterns match prefixes, so a test holds the
|
|
210
223
|
skill's commands to never writing `--force`, `--admin`, `--auto` or
|
|
211
224
|
`--delete-branch`.
|
|
212
225
|
|
|
@@ -414,14 +427,17 @@ when eight threads are asking at once.
|
|
|
414
427
|
`gw sync` fetches every remote with `--prune --tags --no-prune-tags`, the
|
|
415
428
|
default first, updates the default remote's HEAD and queries the forge for
|
|
416
429
|
every local branch tip on eight threads. Every other command but
|
|
417
|
-
`gw version`, `gw ci-checks`, `gw fast-forward`, help and
|
|
418
|
-
the same `sync.run` first when
|
|
430
|
+
`gw version`, `gw list`, `gw ci-checks`, `gw merge`, `gw fast-forward`, help and
|
|
431
|
+
completion runs the same `sync.run` first when
|
|
419
432
|
`sync.due` says so: the default remote's refs time is null or at least
|
|
420
433
|
`WORKTREES_SYNC_TTL` seconds old, 60 by default. The forge time is not read,
|
|
421
434
|
since a forge that keeps failing would sync before every command. Without a
|
|
422
435
|
default remote nothing syncs first, because sync records nothing there.
|
|
423
|
-
`gw
|
|
424
|
-
|
|
436
|
+
`gw list` reads only the worktree records, so it never syncs first and
|
|
437
|
+
prints no word about how fresh the evidence is; its `--json` takes `head`
|
|
438
|
+
and `lastSync` from the cache. `gw fast-forward` runs `sync.fetch` on
|
|
439
|
+
every run instead, which fetches the default remote and records the refs
|
|
440
|
+
time.
|
|
425
441
|
|
|
426
442
|
A failed sync before a command is a warning, and the command goes on with
|
|
427
443
|
the evidence it has; quiet and JSON hide the warning. A failed fetch before
|
|
@@ -434,6 +450,15 @@ first, and `gw sync` and `gw ci-checks` refuse at exit 3. Every notice that woul
|
|
|
434
450
|
`Run: gw sync` goes through `sync.hint`, which leaves that off offline,
|
|
435
451
|
since it names a command that refuses there.
|
|
436
452
|
|
|
453
|
+
`gw merge` squashes one GitHub PR at a supplied head SHA. It waits up to ten
|
|
454
|
+
minutes, polling every five seconds, for lower stack members to merge, the
|
|
455
|
+
base to match the stack base and the head to contain the latest parent merge.
|
|
456
|
+
A rewritten head returns `head-moved` at exit 4 without submitting. It reads
|
|
457
|
+
fresh CI and verifies membership and containment again before calling the
|
|
458
|
+
asynchronous merge API, then polls a pending operation for one minute. `enqueued` is queued, not merged. Both clients call
|
|
459
|
+
the same command; their rules admit `gw merge` without general `gh api`
|
|
460
|
+
writes. [Merge](docs/commands/merge.md) describes the result and refusals.
|
|
461
|
+
|
|
437
462
|
`gw ci-checks` reads one review and its checks from the forge each time it
|
|
438
463
|
runs and writes nothing, the sync cache included. It never syncs first: its
|
|
439
464
|
answer comes from the forge, not from local evidence.
|
|
@@ -464,13 +489,18 @@ patch-id input and creates no synthetic commits.
|
|
|
464
489
|
The per-worktree checks run on eight threads. Mutations remain serial.
|
|
465
490
|
|
|
466
491
|
`gw ci-checks` takes GitHub's review and checks from one `gh pr view` with
|
|
467
|
-
`statusCheckRollup
|
|
468
|
-
|
|
492
|
+
`statusCheckRollup` and `commits`. Commit messages and checks describe the
|
|
493
|
+
same `headSha`. `pr.trailers` holds each trailer once, in commit order,
|
|
494
|
+
oldest first, parsed with `git interpret-trailers --parse`. An incomplete
|
|
495
|
+
commit list gives null trailers; GitHub's 100-commit cap also gives null.
|
|
496
|
+
|
|
497
|
+
It keeps the newest run per workflow and name, and a run with
|
|
469
498
|
no start time counts as newest, so a queued re-run supersedes the failure it
|
|
470
499
|
repeats. GitLab needs several calls: the pipeline is read from the project
|
|
471
|
-
that ran it, its jobs across every page,
|
|
472
|
-
|
|
473
|
-
another SHA is stale unless it is the merged-result
|
|
500
|
+
that ran it, its jobs and the MR's commits across every page, then the merge
|
|
501
|
+
request again. A change between the two reads is `stale` and clears the
|
|
502
|
+
trailers. A pipeline for another SHA is stale unless it is the merged-result
|
|
503
|
+
pipeline whose parents
|
|
474
504
|
are the current head and the target's tip. `ci.wait` takes its clock and
|
|
475
505
|
sleep as arguments, so its tests run in-process without waiting.
|
|
476
506
|
|
|
@@ -565,7 +595,10 @@ not a divergent local counterpart.
|
|
|
565
595
|
Content proof compares changed paths, modes and deletions against the head.
|
|
566
596
|
It cannot settle a stacked branch whose intermediate content the head later
|
|
567
597
|
edited. Cached forge proof verifies source tip, source repository, target
|
|
568
|
-
branch and merge ancestry.
|
|
598
|
+
branch and merge ancestry. A request stacked on another branch keeps that
|
|
599
|
+
branch as its target after the forge lands it on the head, so a merge commit
|
|
600
|
+
on the head's first-parent history stands in for the target branch. Closed
|
|
601
|
+
unmerged requests are never proof.
|
|
569
602
|
|
|
570
603
|
`eligible` combines proof, protections and `--delete` permissions.
|
|
571
604
|
`prune.removable()` selects only eligible rows. `main`, `master` and the
|
|
@@ -585,13 +618,15 @@ worktree removal, full-SHA ref deletion and approved stash drops. Ignored
|
|
|
585
618
|
paths are what an ignore pattern names, so a matched directory is one entry;
|
|
586
619
|
the snapshot is a path listing, not a recursive content fingerprint, and a
|
|
587
620
|
file created inside a listed directory after assessment goes with it. The
|
|
588
|
-
disclosure, the protection's count and the JSON `ignored` field
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
621
|
+
disclosure, the protection's count and the JSON `ignored` field list each
|
|
622
|
+
path as git does, from the top level, sorted, so a tracked directory above
|
|
623
|
+
an ignored one never reads as ignored. A path whose pattern, found with
|
|
624
|
+
`git check-ignore -v`, ends in a bare `*` or `**` reads as its directory,
|
|
625
|
+
since that pattern names the directory's contents. The disclosure quotes a
|
|
626
|
+
path holding a character that would not print, as `git status` does, and
|
|
627
|
+
ends with the `git -C PATH ls-files --others --ignored --exclude-standard`
|
|
628
|
+
line that lists every file below those entries. Stash drops verify SHA and
|
|
629
|
+
repair a concurrent wrong-entry drop using the exact subject. Restoration remains
|
|
595
630
|
possible until Git garbage collection prunes the unreachable stash commit.
|
|
596
631
|
Report checkout, branch and stash outcomes separately after partial failure.
|
|
597
632
|
|
|
@@ -612,7 +647,9 @@ code forever.
|
|
|
612
647
|
The fixture needs no global git config, no signing key, no forge and no
|
|
613
648
|
network. `GIT_CONFIG_GLOBAL` carries that: without it git still reads
|
|
614
649
|
`$HOME/.gitconfig`, and setting `HOME` alone still leaves
|
|
615
|
-
`$XDG_CONFIG_HOME/git/config`. `
|
|
650
|
+
`$XDG_CONFIG_HOME/git/config`. `XDG_CONFIG_HOME` points at the test's own
|
|
651
|
+
directory too, since `GIT_CONFIG_GLOBAL` does not reach `git/ignore`, the
|
|
652
|
+
default `core.excludesFile`. `WORKTREES_OFFLINE=1` in `conftest.ENV` stops
|
|
616
653
|
a command syncing first, which would fetch a remote at `github.com` for
|
|
617
654
|
real. `Network.env` clears it for the fake network, and `conftest.online`
|
|
618
655
|
for a remote on disk.
|
|
@@ -17,6 +17,114 @@ 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.10.0 - 2026-11-13
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
`gw merge NUMBER --match-head-commit SHA` squashes one GitHub pull
|
|
25
|
+
request after checking its head and CI. It respects merge queues and
|
|
26
|
+
waits up to ten minutes for lower native-stack pull requests and the
|
|
27
|
+
head rewrite. A rewritten head returns `head-moved` at exit 4 without
|
|
28
|
+
submitting. `/worktrees:ship-it` waits for CI on that head and rebuilds
|
|
29
|
+
the message before one retry. `/worktrees:ship-it` always squashes on
|
|
30
|
+
GitHub and GitLab.
|
|
31
|
+
|
|
32
|
+
`gw ci-checks --json` includes `pr.trailers`, preserving full coauthor
|
|
33
|
+
and session trailers once each in commit order. `/worktrees:ship-it`
|
|
34
|
+
uses these trailers for squash messages. Missing or incomplete commit
|
|
35
|
+
lists stop `/worktrees:ship-it`; GitHub reviews with 100 or more commits
|
|
36
|
+
have null trailers.
|
|
37
|
+
|
|
38
|
+
The WHY column of the `gw prune`, `gw remove`, `gw branch status` and
|
|
39
|
+
`gw branch prune` tables puts each reason on its own line: the evidence
|
|
40
|
+
first, then every protection under it. The JSON `why` field is unchanged.
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
After the counts, `gw prune` lists every worktree it holds back, one to a
|
|
45
|
+
line with each reason, and leaves out the main checkout; `gw remove` does
|
|
46
|
+
the same for its target. When only `--delete` values hold worktrees back,
|
|
47
|
+
`gw prune` names the command that grants them, keeping the values you
|
|
48
|
+
passed: `gw prune --delete ignored-files makes fix-parser eligible`. The
|
|
49
|
+
list replaces the warning that named unknown worktrees. `gw remove`
|
|
50
|
+
suggests `--keep-branch` only when that flag would make the target
|
|
51
|
+
eligible.
|
|
52
|
+
|
|
53
|
+
When an empty branch or its stashes hold a worktree or a branch back, the
|
|
54
|
+
reason names the value that lifts it: `the branch is empty; pass --delete
|
|
55
|
+
empty` and `its branch has stashes; pass --delete stashes`. Main, master
|
|
56
|
+
and the head branch list only `it is a protected branch`, since no
|
|
57
|
+
`--delete` value frees them.
|
|
58
|
+
|
|
59
|
+
The removal disclosure, the "it holds N ignored path(s)" count and
|
|
60
|
+
`gw prune --json`'s `ignoredPaths` list each ignored path as the pattern
|
|
61
|
+
that ignores it names it, from the top level and sorted by name, with a
|
|
62
|
+
trailing `/` on a directory. A `__pycache__` pattern lists
|
|
63
|
+
`src/pkg/__pycache__/`, where the disclosure read the tracked `src/` as
|
|
64
|
+
ignored and unrecoverable. A pattern for a directory's contents, such as
|
|
65
|
+
`path/to/ignored/*`, lists that directory once. The disclosure ends with a
|
|
66
|
+
`git -C PATH ls-files --others --ignored --exclude-standard` line that
|
|
67
|
+
lists every ignored file, to read before you answer.
|
|
68
|
+
|
|
69
|
+
A branch whose pull request was stacked on another branch read as `unknown`,
|
|
70
|
+
"the request targeted a different branch", after the forge landed it on the
|
|
71
|
+
head branch. `gw prune`, `gw remove`, `gw branch status`, `gw branch prune`
|
|
72
|
+
and `gw fast-forward` now count such a request as proof when its merge
|
|
73
|
+
commit is on the head branch's first-parent history, and the reason names
|
|
74
|
+
the branch it targeted.
|
|
75
|
+
|
|
76
|
+
`gw fast-forward` takes GitHub's rewrite of a stacked pull request's
|
|
77
|
+
branch instead of replaying the same commits locally, so the push after
|
|
78
|
+
it no longer overwrites GitHub's commits and `--force-if-includes` no
|
|
79
|
+
longer refuses it. Run straight after the pull request below merges, it
|
|
80
|
+
waits up to a minute for that rewrite. `--json` names the remote copy it
|
|
81
|
+
took in `adopted`.
|
|
82
|
+
|
|
83
|
+
`gw list` and `gw l` list worktrees without syncing first: they no longer
|
|
84
|
+
fetch every remote and query the forge when a sync is due, and print no
|
|
85
|
+
`Head:`, `Last sync:` or `Never synced:` line. `gw list --json` still
|
|
86
|
+
carries `head` and `lastSync` from the last sync.
|
|
87
|
+
|
|
88
|
+
`/worktrees:ship-it` writes the release note with `release:write` when the
|
|
89
|
+
`release` plugin is installed. It looked for the `release-notes` plugin,
|
|
90
|
+
which `release` replaced, so it skipped the note.
|
|
91
|
+
|
|
92
|
+
## 0.9.0 - 2026-11-09
|
|
93
|
+
|
|
94
|
+
### Removed
|
|
95
|
+
|
|
96
|
+
`/worktrees:merge` is removed. `/worktrees:ship-it 41 42` ships open pull
|
|
97
|
+
requests or merge requests the way it did, one at a time and a stack
|
|
98
|
+
bottom first, but unassisted: it pushes fixes and merges without asking,
|
|
99
|
+
under the rules `ship-it/rights.md` lists, which `/worktrees:preflight`
|
|
100
|
+
adds to Claude Code's settings, where the merge skill asked before each
|
|
101
|
+
push and merge.
|
|
102
|
+
|
|
103
|
+
### Added
|
|
104
|
+
|
|
105
|
+
The agent plugin adds `preflight`, run by name as `/worktrees:preflight user`
|
|
106
|
+
or `/worktrees:preflight project`. It adds the permission rules `ship-it`
|
|
107
|
+
needs to `~/.claude/settings.json` or the repository's
|
|
108
|
+
`.claude/settings.json`, after showing every missing line and asking. A
|
|
109
|
+
committed project file reaches every machine that clones the repository.
|
|
110
|
+
|
|
111
|
+
### Fixed
|
|
112
|
+
|
|
113
|
+
`/worktrees:ship-it` could report a pull request as queued when no merge
|
|
114
|
+
queue held it. When `gh pr merge` exits 0 and the pull request is still
|
|
115
|
+
open, it now reports it as queued only when gh warned about the merge queue
|
|
116
|
+
or auto-merge is set, and as still open otherwise.
|
|
117
|
+
|
|
118
|
+
When `/worktrees:ship-it` ships several pull requests and one of them does
|
|
119
|
+
not merge, it no longer merges a pull request stacked on that one, which
|
|
120
|
+
would have landed on its branch instead of the head branch. It reports the
|
|
121
|
+
stacked pull request as waiting.
|
|
122
|
+
|
|
123
|
+
`gw fast-forward` refused a branch nobody had pushed once the head branch
|
|
124
|
+
moved, saying the forge could not be asked which request carried its first
|
|
125
|
+
commit. It now rebases such a branch, and refuses only when the forge
|
|
126
|
+
fails for another reason.
|
|
127
|
+
|
|
20
128
|
## 0.8.0 - 2026-11-09
|
|
21
129
|
|
|
22
130
|
### Changed
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
.PHONY: install-local
|
|
1
|
+
.PHONY: install install-local
|
|
2
2
|
|
|
3
3
|
VERSION := $(shell sed -n 's/^version = "\(.*\)"$$/\1/p' pyproject.toml)
|
|
4
4
|
ZSH_PLUGINS ?= $(or $(ZDOTDIR),$(HOME))/.zsh_plugins.txt
|
|
5
5
|
|
|
6
|
-
# The working copy, in place of anything published
|
|
6
|
+
# The working copy, in place of anything published: the CLI from this
|
|
7
|
+
# checkout, and Fisher and Antidote pointed at it. Run it again after a
|
|
8
|
+
# change here, since uv and Fisher copy the files at install.
|
|
7
9
|
install-local:
|
|
8
10
|
uv tool install --force --from . git-worktrees
|
|
9
|
-
|
|
10
|
-
# Undoes install-local: the latest release from PyPI, and only its commands.
|
|
11
|
-
reset:
|
|
12
|
-
uv tool install --force git-worktrees
|
|
13
|
-
|
|
14
|
-
# Points Fisher and Antidote at this checkout. Run it again after a change
|
|
15
|
-
# here, since Fisher copies the files at install.
|
|
16
|
-
local-plugin:
|
|
17
11
|
$(call fish_plugin,$(CURDIR))
|
|
18
12
|
$(call zsh_plugin,$(CURDIR)/zsh/plugins/worktrees)
|
|
19
13
|
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
|
|
14
|
+
# This version as published, in place of anything else: the CLI from PyPI
|
|
15
|
+
# and the shell plugin from GitHub at its tag, so the two match. The
|
|
16
|
+
# Antidote clone goes first, so the next shell clones it at that tag.
|
|
17
|
+
install:
|
|
18
|
+
uv tool install --force git-worktrees==$(VERSION)
|
|
23
19
|
$(call fish_plugin,MihaiBojin/worktrees@v$(VERSION))
|
|
24
20
|
-command -v zsh >/dev/null && test -f "$(ZSH_PLUGINS)" && \
|
|
25
21
|
zsh -ic 'antidote purge MihaiBojin/worktrees' </dev/null
|