git-worktrees 0.12.0__tar.gz → 0.12.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.12.0 → git_worktrees-0.12.2}/.github/workflows/publish.yml +147 -3
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/AGENTS.md +17 -3
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/CHANGELOG.md +26 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/Makefile +33 -13
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/PKG-INFO +14 -8
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/README.md +13 -7
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/conf.d/worktrees.fish +1 -1
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/docs/DEVELOPMENT.md +53 -9
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/.claude-plugin/plugin.json +1 -1
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/.codex-plugin/plugin.json +1 -1
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/README.md +8 -3
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/plugin.json +1 -1
- git_worktrees-0.12.2/plugin/session.md +45 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/skills/ship-it/rights.md +6 -1
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/pyproject.toml +1 -1
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/cli.py +1 -1
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/prune.py +18 -4
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/worktree.py +67 -15
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_plugin.py +40 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_removal.py +25 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/uv.lock +1 -1
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/worktrees.plugin.zsh +1 -1
- git_worktrees-0.12.0/plugin/session.md +0 -32
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/.claude/settings.json +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/.codex/config.toml +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/.github/workflows/codeql.yml +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/.github/workflows/testpypi.yml +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/.github/workflows/tests.yml +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/.gitignore +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/.pre-commit-config.yaml +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/.python-version +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/.releasetools.yaml +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/LICENSE +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/completions/gw.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/completions/worktrees.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/docs/BENCHMARK.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/docs/REFERENCE.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/docs/commands/branch-prune.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/docs/commands/branch-status.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/docs/commands/ci-checks.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/docs/commands/fast-forward.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/docs/commands/merge.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/docs/plans/2026-11-05-worktree-pruning-design.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gw.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwa.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwbc.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwbp.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwbs.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwff.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwl.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwm.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwp!.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwp.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwpa!.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwpa.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwr!.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gwr.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/functions/gws.fish +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/hatch_build.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/hooks/codex.json +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/hooks/hooks.json +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/skills/ci-checks/SKILL.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/skills/describe-pr/SKILL.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/skills/describe-pr/format.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/skills/fast-forward/SKILL.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/skills/preflight/SKILL.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/skills/preflight/agents/openai.yaml +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/skills/preflight/rules.json +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/skills/prune/SKILL.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/plugin/skills/ship-it/SKILL.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/renovate.json +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/scripts/README.md +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/scripts/benchmark.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/scripts/bump_version.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/scripts/verify-publish.bash +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/__init__.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/audit.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/branch_cli.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/branch_forge.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/branches.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/ci.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/errors.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/fast_forward.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/forge.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/git.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/layout.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/merged.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/new_branch.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/pick.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/pr_merge.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/progress.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/render.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/repo.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/sync.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/src/worktrees/verdicts.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/audit_schema.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/conftest.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_assessment.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_audit.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_benchmark.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_branch_forge.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_branches.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_ci.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_cli.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_command_defaults.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_completions.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_fast_forward.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_fixture.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_forge.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_gates.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_git_records.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_new_branch.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_partial_clone.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_path_boundaries.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_pr_merge.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_render.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_shims.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_spec.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_sync.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_version.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/tests/test_worktree.py +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/completions/_gw +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gw +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwa +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwbc +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwbp +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwbs +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwff +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwl +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwm +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwp +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwp! +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwpa +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwpa! +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwr +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gwr! +0 -0
- {git_worktrees-0.12.0 → git_worktrees-0.12.2}/zsh/plugins/worktrees/functions/gws +0 -0
|
@@ -5,7 +5,7 @@ run-name: Release ${{ inputs.version && format('v{0}', inputs.version) || github
|
|
|
5
5
|
# request against the repository, this workflow's FILENAME and the environment,
|
|
6
6
|
# so a rename means re-registering the publisher on PyPI first.
|
|
7
7
|
#
|
|
8
|
-
# build -> tag -> publish -> release
|
|
8
|
+
# build -> tag -> publish -> release -> list
|
|
9
9
|
# \-> verify
|
|
10
10
|
#
|
|
11
11
|
# A release is a version bump merged into main, then published one of two
|
|
@@ -22,8 +22,9 @@ run-name: Release ${{ inputs.version && format('v{0}', inputs.version) || github
|
|
|
22
22
|
# is left to prove before the upload PyPI cannot take back is that the wheel
|
|
23
23
|
# runs, and build installs it and does that.
|
|
24
24
|
#
|
|
25
|
-
# No
|
|
26
|
-
#
|
|
25
|
+
# No PyPI token is stored anywhere. The one stored credential is the
|
|
26
|
+
# automation App's key, which list uses to reach the marketplace. See
|
|
27
|
+
# docs/DEVELOPMENT.md, "Publishing a version" and "Listing the plugin".
|
|
27
28
|
|
|
28
29
|
on:
|
|
29
30
|
push:
|
|
@@ -313,3 +314,146 @@ jobs:
|
|
|
313
314
|
tag_name: ${{ env.TAG }}
|
|
314
315
|
body_path: RELEASE_NOTES.md
|
|
315
316
|
make_latest: true
|
|
317
|
+
|
|
318
|
+
# MihaiBojin/agent-plugins lists the agent plugin at a release tag, and a
|
|
319
|
+
# client installs the tag that listing names. This job opens the pull
|
|
320
|
+
# request that moves it to this one. GITHUB_TOKEN reaches no other
|
|
321
|
+
# repository, so the job runs as the automation App; without the App's
|
|
322
|
+
# GH_APP_CLIENT_ID it warns and changes nothing.
|
|
323
|
+
list:
|
|
324
|
+
name: List the plugin in the marketplace
|
|
325
|
+
runs-on: ubuntu-24.04
|
|
326
|
+
needs: release
|
|
327
|
+
if: ${{ !cancelled() && needs.release.result == 'success' }}
|
|
328
|
+
permissions:
|
|
329
|
+
contents: read
|
|
330
|
+
env:
|
|
331
|
+
MARKETPLACE: ${{ github.repository_owner }}/agent-plugins
|
|
332
|
+
steps:
|
|
333
|
+
- name: Warn that the App is not configured
|
|
334
|
+
if: vars.GH_APP_CLIENT_ID == ''
|
|
335
|
+
run: >-
|
|
336
|
+
echo "::warning::GH_APP_CLIENT_ID is not set, so $MARKETPLACE still
|
|
337
|
+
lists the previous tag. See docs/DEVELOPMENT.md, \"Listing the plugin\"."
|
|
338
|
+
|
|
339
|
+
- name: Mint a token for the marketplace
|
|
340
|
+
id: app-token
|
|
341
|
+
if: vars.GH_APP_CLIENT_ID != ''
|
|
342
|
+
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
|
|
343
|
+
with:
|
|
344
|
+
client-id: ${{ vars.GH_APP_CLIENT_ID }}
|
|
345
|
+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
|
346
|
+
owner: ${{ github.repository_owner }}
|
|
347
|
+
repositories: agent-plugins
|
|
348
|
+
permission-contents: write
|
|
349
|
+
permission-pull-requests: write
|
|
350
|
+
|
|
351
|
+
# The release commit, for the description the plugin ships with.
|
|
352
|
+
- name: Checkout code
|
|
353
|
+
if: vars.GH_APP_CLIENT_ID != ''
|
|
354
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
355
|
+
with:
|
|
356
|
+
path: source
|
|
357
|
+
persist-credentials: false
|
|
358
|
+
|
|
359
|
+
- name: Checkout the marketplace
|
|
360
|
+
if: vars.GH_APP_CLIENT_ID != ''
|
|
361
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
362
|
+
with:
|
|
363
|
+
repository: ${{ env.MARKETPLACE }}
|
|
364
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
365
|
+
path: marketplace
|
|
366
|
+
persist-credentials: false
|
|
367
|
+
|
|
368
|
+
# The listing's ref and description, then both catalogs from them with
|
|
369
|
+
# the marketplace's own sync script. The README's row is shorter
|
|
370
|
+
# hand-written prose and stays as it is.
|
|
371
|
+
- name: Point the listing at this tag
|
|
372
|
+
id: bump
|
|
373
|
+
if: vars.GH_APP_CLIENT_ID != ''
|
|
374
|
+
working-directory: marketplace
|
|
375
|
+
run: |
|
|
376
|
+
set -euo pipefail
|
|
377
|
+
description="$(jq -er .description ../source/plugin/.claude-plugin/plugin.json)"
|
|
378
|
+
node -e '
|
|
379
|
+
const fs = require("node:fs");
|
|
380
|
+
const [tag, description] = process.argv.slice(1);
|
|
381
|
+
const plugins = JSON.parse(fs.readFileSync("remote-plugins.json", "utf8"));
|
|
382
|
+
const entry = plugins.find((plugin) => plugin.name === "worktrees");
|
|
383
|
+
if (!entry) throw new Error("remote-plugins.json lists no worktrees");
|
|
384
|
+
entry.ref = tag;
|
|
385
|
+
entry.description = description;
|
|
386
|
+
fs.writeFileSync("remote-plugins.json", JSON.stringify(plugins, null, 2) + "\n");
|
|
387
|
+
' "$TAG" "$description"
|
|
388
|
+
node scripts/sync-catalogs.mjs
|
|
389
|
+
if git diff --quiet; then
|
|
390
|
+
echo "$MARKETPLACE already lists $TAG." >&2
|
|
391
|
+
echo "changed=false" >>"$GITHUB_OUTPUT"
|
|
392
|
+
exit 0
|
|
393
|
+
fi
|
|
394
|
+
git diff --stat
|
|
395
|
+
staged="$RUNNER_TEMP/listing"
|
|
396
|
+
git diff --name-only | while read -r file; do
|
|
397
|
+
mkdir -p "$staged/$(dirname "$file")"
|
|
398
|
+
cp "$file" "$staged/$file"
|
|
399
|
+
done
|
|
400
|
+
echo "staged=$staged" >>"$GITHUB_OUTPUT"
|
|
401
|
+
echo "changed=true" >>"$GITHUB_OUTPUT"
|
|
402
|
+
|
|
403
|
+
# signed-push commits onto a branch that exists, so the branch starts at
|
|
404
|
+
# the marketplace's main. A rerun finds it: with its pull request open
|
|
405
|
+
# there is nothing left to do, and without one a person decides.
|
|
406
|
+
- name: Create the branch
|
|
407
|
+
id: branch
|
|
408
|
+
if: steps.bump.outputs.changed == 'true'
|
|
409
|
+
working-directory: marketplace
|
|
410
|
+
env:
|
|
411
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
412
|
+
run: |
|
|
413
|
+
set -euo pipefail
|
|
414
|
+
branch="worktrees-$TAG"
|
|
415
|
+
echo "name=$branch" >>"$GITHUB_OUTPUT"
|
|
416
|
+
if gh api "repos/$MARKETPLACE/git/ref/heads/$branch" >/dev/null 2>&1; then
|
|
417
|
+
open="$(gh pr list --repo "$MARKETPLACE" --head "$branch" --state open --json url --jq '.[].url')"
|
|
418
|
+
if [ -n "$open" ]; then
|
|
419
|
+
echo "$branch already has a pull request: $open" >&2
|
|
420
|
+
echo "action=none" >>"$GITHUB_OUTPUT"
|
|
421
|
+
exit 0
|
|
422
|
+
fi
|
|
423
|
+
echo "::error::$MARKETPLACE has a branch $branch with no open pull request. Open one for it or delete it, then re-run this job."
|
|
424
|
+
exit 1
|
|
425
|
+
fi
|
|
426
|
+
gh api --method POST "repos/$MARKETPLACE/git/refs" \
|
|
427
|
+
-f ref="refs/heads/$branch" -f sha="$(git rev-parse HEAD)" >/dev/null
|
|
428
|
+
echo "action=commit" >>"$GITHUB_OUTPUT"
|
|
429
|
+
|
|
430
|
+
# The marketplace's main requires verified signatures, which a commit
|
|
431
|
+
# made with git on the runner lacks. signed-push commits through the
|
|
432
|
+
# API, which GitHub signs for the App.
|
|
433
|
+
- name: Commit the listing, signed
|
|
434
|
+
if: steps.branch.outputs.action == 'commit'
|
|
435
|
+
uses: releasetools/actions/signed-push@9828828b39bb2261f95b6f45749fb96ce22c9d2d # v0.12.1
|
|
436
|
+
with:
|
|
437
|
+
source-dir: ${{ steps.bump.outputs.staged }}
|
|
438
|
+
target-repo: ${{ env.MARKETPLACE }}
|
|
439
|
+
target-branch: ${{ steps.branch.outputs.name }}
|
|
440
|
+
headline: "chore(worktrees): List ${{ env.TAG }}"
|
|
441
|
+
body: |
|
|
442
|
+
Source-Tag: <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ env.TAG }}>
|
|
443
|
+
prune: "false"
|
|
444
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
445
|
+
|
|
446
|
+
# Opened as the App, so the marketplace's own checks run on it. Merging
|
|
447
|
+
# is left to a person.
|
|
448
|
+
- name: Open the pull request
|
|
449
|
+
if: steps.branch.outputs.action == 'commit'
|
|
450
|
+
env:
|
|
451
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
452
|
+
BRANCH: ${{ steps.branch.outputs.name }}
|
|
453
|
+
RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
454
|
+
run: |
|
|
455
|
+
body="$(printf '%s\n\n%s\n' \
|
|
456
|
+
"The \`worktrees\` listing installs the plugin from its $TAG tag." \
|
|
457
|
+
"Opened by [$GITHUB_REPOSITORY's publish run]($RUN).")"
|
|
458
|
+
gh pr create --repo "$MARKETPLACE" --base main --head "$BRANCH" \
|
|
459
|
+
--title "chore(worktrees): List $TAG" --body "$body"
|
|
@@ -275,9 +275,11 @@ Both clients hand each session `plugin/session.md` when it starts: a
|
|
|
275
275
|
`SessionStart` hook in `plugin/hooks/hooks.json` for Claude Code and
|
|
276
276
|
`plugin/hooks/codex.json`, which the Codex manifest names, wraps the file
|
|
277
277
|
in the `additionalContext` JSON with `jq`. The rules say how a session uses
|
|
278
|
-
its worktree
|
|
279
|
-
|
|
280
|
-
|
|
278
|
+
its worktree: one per repository, one branch at a time, another only where
|
|
279
|
+
it has none or another session works in it, and the check it makes before
|
|
280
|
+
editing and whenever changes appear: changes it did not make, or
|
|
281
|
+
another process's lock, mean another session works there. Nothing locks a
|
|
282
|
+
worktree for a session.
|
|
281
283
|
|
|
282
284
|
The plugin carries the release version in three manifests, and
|
|
283
285
|
`scripts/bump_version.py` stamps all three. `plugin/plugin.json` is the
|
|
@@ -545,6 +547,18 @@ git process whose work is the CPU's, so more threads than cores only queue
|
|
|
545
547
|
behind each other and the interpreter lock; `sync` keeps eight, since its
|
|
546
548
|
threads wait on the network. Mutations remain serial.
|
|
547
549
|
|
|
550
|
+
The recheck after confirmation is an assessment too, so `gw prune` runs one
|
|
551
|
+
for the whole batch, `worktree.recheck`, on the same threads, and then
|
|
552
|
+
removes one target at a time. Rechecking before each removal read every
|
|
553
|
+
checkout one after another, which a repository whose `git status` takes
|
|
554
|
+
half a minute pays once a target. Just before it deletes, `worktree.remove`
|
|
555
|
+
still checks the head and the worktree's record, branch, sha and flags, so
|
|
556
|
+
a ref an earlier removal moved refuses the later one, and
|
|
557
|
+
`git worktree remove` refuses a checkout dirtied since. What the wider gap
|
|
558
|
+
leaves open is an ignored path written between the batch recheck and that
|
|
559
|
+
target's removal. A single target, as `gw remove` has, is rechecked as it
|
|
560
|
+
is removed.
|
|
561
|
+
|
|
548
562
|
An assessment asks every worktree the same questions about the head, so
|
|
549
563
|
`merged.reuse()` keeps the answers that name objects by full SHA for the
|
|
550
564
|
length of one `assess`: a commit's tree, a merge base, the patch-ids of the
|
|
@@ -17,6 +17,32 @@ 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.12.2 - 2026-11-17
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
A session keeps one worktree per repository and starts each branch in
|
|
25
|
+
it. It creates a worktree only in a repository where it has none, or
|
|
26
|
+
when another session is working in its own.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
Codex sessions that ship a change no longer stop for approval at
|
|
31
|
+
`gw sync` or `git switch --create` once the rules in ship-it's
|
|
32
|
+
`rights.md` are installed.
|
|
33
|
+
|
|
34
|
+
## 0.12.1 - 2026-11-16
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
`gw prune` rechecks every worktree you approved in one pass, on the same
|
|
39
|
+
threads as the first assessment, then removes them one at a time. In a
|
|
40
|
+
repository where `git status` takes half a minute, removing several
|
|
41
|
+
worktrees no longer waits that long for each one. Each removal still
|
|
42
|
+
refuses a ref an earlier removal moved and a checkout dirtied since, and
|
|
43
|
+
an ignored path written after the batch recheck goes with its worktree.
|
|
44
|
+
`gw remove` rechecks its one target as it removes it, as before.
|
|
45
|
+
|
|
20
46
|
## 0.12.0 - 2026-11-16
|
|
21
47
|
|
|
22
48
|
### Changed
|
|
@@ -1,25 +1,39 @@
|
|
|
1
|
-
.PHONY: install install-local
|
|
1
|
+
.PHONY: install install-latest install-pinned 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
|
+
install: install-latest
|
|
7
|
+
|
|
8
|
+
# The newest published CLI and the shell plugin from the default branch,
|
|
9
|
+
# none of them pinned, so `uv tool upgrade`, `fisher update` and
|
|
10
|
+
# `antidote update` move each one on.
|
|
11
|
+
install-latest:
|
|
12
|
+
$(call cli,git-worktrees)
|
|
13
|
+
$(call fish_plugin,MihaiBojin/worktrees)
|
|
14
|
+
$(call zsh_plugin,MihaiBojin/worktrees path:zsh/plugins/worktrees)
|
|
15
|
+
|
|
16
|
+
# This version as published: the CLI from PyPI and the shell plugin from
|
|
17
|
+
# GitHub at its tag, so the two match. An update leaves all three where
|
|
18
|
+
# they are.
|
|
19
|
+
install-pinned:
|
|
20
|
+
$(call cli,git-worktrees==$(VERSION))
|
|
21
|
+
$(call fish_plugin,MihaiBojin/worktrees@v$(VERSION))
|
|
22
|
+
$(call zsh_plugin,MihaiBojin/worktrees branch:v$(VERSION) path:zsh/plugins/worktrees)
|
|
23
|
+
|
|
6
24
|
# The working copy, in place of anything published: the CLI from this
|
|
7
25
|
# checkout, and Fisher and Antidote pointed at it. Run it again after a
|
|
8
26
|
# change here, since uv and Fisher copy the files at install.
|
|
9
27
|
install-local:
|
|
10
|
-
|
|
28
|
+
$(call cli,--from . git-worktrees)
|
|
11
29
|
$(call fish_plugin,$(CURDIR))
|
|
12
30
|
$(call zsh_plugin,$(CURDIR)/zsh/plugins/worktrees)
|
|
13
31
|
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
install
|
|
18
|
-
|
|
19
|
-
$(call fish_plugin,MihaiBojin/worktrees@v$(VERSION))
|
|
20
|
-
-command -v zsh >/dev/null && test -f "$(ZSH_PLUGINS)" && \
|
|
21
|
-
zsh -ic 'antidote purge MihaiBojin/worktrees' </dev/null
|
|
22
|
-
$(call zsh_plugin,MihaiBojin/worktrees branch:v$(VERSION) path:zsh/plugins/worktrees)
|
|
32
|
+
# Uninstalls the CLI, if it is there, then installs $(1).
|
|
33
|
+
define cli
|
|
34
|
+
-uv tool uninstall git-worktrees
|
|
35
|
+
uv tool install $(1)
|
|
36
|
+
endef
|
|
23
37
|
|
|
24
38
|
# Removes every installed copy of this plugin, published or local, then
|
|
25
39
|
# installs $(1). Skipped where fish or Fisher is missing. Fisher reads
|
|
@@ -36,10 +50,16 @@ define fish_plugin
|
|
|
36
50
|
fi
|
|
37
51
|
endef
|
|
38
52
|
|
|
39
|
-
#
|
|
40
|
-
#
|
|
53
|
+
# Purges Antidote's clone of the published plugin, then replaces this
|
|
54
|
+
# plugin's line in zsh_plugins.txt, published or local, with $(1), or
|
|
55
|
+
# appends it. The clone goes first, since Antidote checks a branch or tag
|
|
56
|
+
# out only when it clones, and the next shell clones it anew. Writes
|
|
57
|
+
# through cat, so a symlinked file stays one.
|
|
41
58
|
define zsh_plugin
|
|
42
59
|
if test -f "$(ZSH_PLUGINS)"; then \
|
|
60
|
+
if command -v zsh >/dev/null; then \
|
|
61
|
+
zsh -ic 'antidote purge MihaiBojin/worktrees' </dev/null || true; \
|
|
62
|
+
fi; \
|
|
43
63
|
awk -v entry='$(1)' ' \
|
|
44
64
|
tolower($$1) == "mihaibojin/worktrees" || $$1 ~ /\/zsh\/plugins\/worktrees$$/ { \
|
|
45
65
|
if (!done) print entry; done = 1; next \
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: git-worktrees
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.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.12.
|
|
107
|
+
fisher install MihaiBojin/worktrees@v0.12.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.12.
|
|
124
|
+
MihaiBojin/worktrees branch:v0.12.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.12.
|
|
200
|
-
The shell plugin here is 0.12.
|
|
199
|
+
worktrees 0.12.2: git worktree commands that refuse to lose work
|
|
200
|
+
The shell plugin here is 0.12.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
|
|
@@ -378,6 +378,10 @@ Below the list, `git -C PATH ls-files --others --ignored --exclude-standard`
|
|
|
378
378
|
lists every ignored file, for you to read before answering.
|
|
379
379
|
Quiet, JSON and `--yes` keep this disclosure on stderr.
|
|
380
380
|
It repeats the assessment after confirmation and refuses changed targets.
|
|
381
|
+
`gw prune` repeats it for every target together, before the first removal,
|
|
382
|
+
so a repository with a slow `git status` waits for it once and not once a
|
|
383
|
+
worktree; each removal then checks the head branch and the worktree's
|
|
384
|
+
record again, and `git worktree remove` refuses a checkout changed since.
|
|
381
385
|
Ignored directory entries can cover a whole directory; the recheck compares
|
|
382
386
|
Git's ignored path listing, not a fingerprint of every file's contents.
|
|
383
387
|
|
|
@@ -704,9 +708,11 @@ asking, and add the permission rules shipping needs to Claude Code's
|
|
|
704
708
|
settings.
|
|
705
709
|
|
|
706
710
|
The skills handle branches, pull requests and merges in the checkout the
|
|
707
|
-
session runs in, and never create a worktree.
|
|
708
|
-
worktrees
|
|
709
|
-
|
|
711
|
+
session runs in, and never create a worktree. A person creates and
|
|
712
|
+
chooses worktrees through `gw add` and `gw list`, and the agent's client
|
|
713
|
+
through `claude --worktree` and `codex --worktree`. A Claude Code session
|
|
714
|
+
keeps one worktree per repository and runs `gw add` itself only where it
|
|
715
|
+
has none yet, or when another session is working in the one it has.
|
|
710
716
|
|
|
711
717
|
## Contributing
|
|
712
718
|
|
|
@@ -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.12.
|
|
80
|
+
fisher install MihaiBojin/worktrees@v0.12.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.12.
|
|
97
|
+
MihaiBojin/worktrees branch:v0.12.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.12.
|
|
173
|
-
The shell plugin here is 0.12.
|
|
172
|
+
worktrees 0.12.2: git worktree commands that refuse to lose work
|
|
173
|
+
The shell plugin here is 0.12.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
|
|
@@ -351,6 +351,10 @@ Below the list, `git -C PATH ls-files --others --ignored --exclude-standard`
|
|
|
351
351
|
lists every ignored file, for you to read before answering.
|
|
352
352
|
Quiet, JSON and `--yes` keep this disclosure on stderr.
|
|
353
353
|
It repeats the assessment after confirmation and refuses changed targets.
|
|
354
|
+
`gw prune` repeats it for every target together, before the first removal,
|
|
355
|
+
so a repository with a slow `git status` waits for it once and not once a
|
|
356
|
+
worktree; each removal then checks the head branch and the worktree's
|
|
357
|
+
record again, and `git worktree remove` refuses a checkout changed since.
|
|
354
358
|
Ignored directory entries can cover a whole directory; the recheck compares
|
|
355
359
|
Git's ignored path listing, not a fingerprint of every file's contents.
|
|
356
360
|
|
|
@@ -677,9 +681,11 @@ asking, and add the permission rules shipping needs to Claude Code's
|
|
|
677
681
|
settings.
|
|
678
682
|
|
|
679
683
|
The skills handle branches, pull requests and merges in the checkout the
|
|
680
|
-
session runs in, and never create a worktree.
|
|
681
|
-
worktrees
|
|
682
|
-
|
|
684
|
+
session runs in, and never create a worktree. A person creates and
|
|
685
|
+
chooses worktrees through `gw add` and `gw list`, and the agent's client
|
|
686
|
+
through `claude --worktree` and `codex --worktree`. A Claude Code session
|
|
687
|
+
keeps one worktree per repository and runs `gw add` itself only where it
|
|
688
|
+
has none yet, or when another session is working in the one it has.
|
|
683
689
|
|
|
684
690
|
## Contributing
|
|
685
691
|
|
|
@@ -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.12.
|
|
7
|
+
set -gx WORKTREES_PLUGIN_VERSION 0.12.2
|
|
@@ -71,20 +71,31 @@ interpreter comes from uv. [docs/BENCHMARK.md](BENCHMARK.md) is the last run.
|
|
|
71
71
|
## Working on a checkout
|
|
72
72
|
|
|
73
73
|
```console
|
|
74
|
-
make install
|
|
75
|
-
make install
|
|
74
|
+
make install # same as install-latest
|
|
75
|
+
make install-latest # the newest CLI and the shell plugin from the default branch
|
|
76
|
+
make install-pinned # this version as published: the CLI and the shell plugin
|
|
77
|
+
make install-local # this checkout's CLI and shell plugin
|
|
76
78
|
```
|
|
77
79
|
|
|
80
|
+
Each target first uninstalls the CLI and removes every copy of the shell
|
|
81
|
+
plugin, published or local, then installs its own.
|
|
82
|
+
|
|
83
|
+
`make install-latest` installs the newest `git-worktrees` from PyPI and the
|
|
84
|
+
shell plugin from GitHub's default branch, neither pinned, so
|
|
85
|
+
`uv tool upgrade git-worktrees`, `fisher update` and `antidote update` move
|
|
86
|
+
them forward. The default branch can hold plugin changes that no release
|
|
87
|
+
has yet, and `gw version` does not see them: both report the last release.
|
|
88
|
+
|
|
89
|
+
`make install-pinned` installs the release `pyproject.toml` names, from
|
|
90
|
+
PyPI, and the shell plugin from GitHub at that release's tag, so the CLI and
|
|
91
|
+
the plugin match. An update leaves all three where they are; run the target
|
|
92
|
+
again from a newer checkout to move them.
|
|
93
|
+
|
|
78
94
|
`make install-local` installs the working copy in place of anything
|
|
79
95
|
published. `gw` on your `$PATH` is the code in front of you, and Fisher and
|
|
80
96
|
Antidote load the shell plugin from this checkout. Run it again after a
|
|
81
97
|
change, since uv and Fisher copy the files at install.
|
|
82
98
|
|
|
83
|
-
`make install` undoes it: the release `pyproject.toml` names, from PyPI,
|
|
84
|
-
and the shell plugin from GitHub at that release's tag, so the CLI and the
|
|
85
|
-
plugin match. A command only the working copy has, such as one renamed since that
|
|
86
|
-
release, leaves `~/.local/bin` with it.
|
|
87
|
-
|
|
88
99
|
The fish half is skipped where fish or Fisher is missing, and the zsh half
|
|
89
100
|
where Antidote's list is: `$ZDOTDIR/.zsh_plugins.txt`, else
|
|
90
101
|
`~/.zsh_plugins.txt`, or the file `ZSH_PLUGINS=` names.
|
|
@@ -274,7 +285,7 @@ it with the version and the release commit, and its `tag` job creates the tag
|
|
|
274
285
|
on that commit.
|
|
275
286
|
|
|
276
287
|
```
|
|
277
|
-
build ──> tag ──> publish ──> release
|
|
288
|
+
build ──> tag ──> publish ──> release ──> list
|
|
278
289
|
└─> verify
|
|
279
290
|
```
|
|
280
291
|
|
|
@@ -312,6 +323,39 @@ does not start `publish.yml` again. A dispatch that fails after `tag` is
|
|
|
312
323
|
finished by re-running its failed jobs, since a fresh dispatch refuses the tag
|
|
313
324
|
that run made.
|
|
314
325
|
|
|
326
|
+
## Listing the plugin
|
|
327
|
+
|
|
328
|
+
`MihaiBojin/agent-plugins` lists the agent plugin as `worktrees@mihaibojin`,
|
|
329
|
+
from an entry in its `remote-plugins.json` pinned to a release tag. A client
|
|
330
|
+
installs the tag that entry names, so until it moves every client keeps the
|
|
331
|
+
previous plugin.
|
|
332
|
+
|
|
333
|
+
`list` runs after `release` and opens the pull request that moves it. It sets
|
|
334
|
+
the entry's `ref` to the tag and its `description` to the one in
|
|
335
|
+
`plugin/.claude-plugin/plugin.json` at the release commit, runs the
|
|
336
|
+
marketplace's `scripts/sync-catalogs.mjs` to write both catalogs, commits the
|
|
337
|
+
result to `worktrees-v<version>` through `signed-push` and opens
|
|
338
|
+
`chore(worktrees): List v<version>`. The marketplace's checks run on it, and
|
|
339
|
+
merging it is left to a person. The README row there is shorter prose of its
|
|
340
|
+
own and is not touched. A rerun finds the branch and stops: done when its pull
|
|
341
|
+
request is open, an error naming the branch when it is not.
|
|
342
|
+
|
|
343
|
+
`GITHUB_TOKEN` cannot write to another repository, so the job runs as a
|
|
344
|
+
GitHub App, the same setup `releasetools/cli` uses to reach its Homebrew tap.
|
|
345
|
+
The App needs Contents and Pull requests write, and an installation covering
|
|
346
|
+
`worktrees` and `agent-plugins`. A personal account has no account-level
|
|
347
|
+
Actions secrets, so both values live on this repository:
|
|
348
|
+
|
|
349
|
+
```console
|
|
350
|
+
gh variable set GH_APP_CLIENT_ID -R MihaiBojin/worktrees --body <client-id>
|
|
351
|
+
gh secret set GH_APP_PRIVATE_KEY -R MihaiBojin/worktrees < <app>.private-key.pem
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
`scripts/create-github-app.sh` in `releasetools/terraform-modules` creates
|
|
355
|
+
such an App from a manifest and prints these two commands. Without
|
|
356
|
+
`GH_APP_CLIENT_ID` the job warns and changes nothing, and the listing is
|
|
357
|
+
moved by hand: the same edit, `npm run sync`, and a pull request.
|
|
358
|
+
|
|
315
359
|
## Snapshots on TestPyPI
|
|
316
360
|
|
|
317
361
|
`testpypi.yml` runs on every commit to `main`. It numbers the tree
|
|
@@ -343,7 +387,7 @@ enforces.
|
|
|
343
387
|
The suite is not run again there. `tests.yml` runs it on the same commit, and
|
|
344
388
|
a snapshot a test would have caught costs one number on a test index.
|
|
345
389
|
|
|
346
|
-
No
|
|
390
|
+
No PyPI token is stored anywhere. Every upload uses Trusted Publishing over
|
|
347
391
|
OIDC, which matches a request against the repository, the workflow filename
|
|
348
392
|
and the environment, so each row below is its own registration:
|
|
349
393
|
|
|
@@ -25,9 +25,14 @@ the next with `gw branch create` or `git switch --create`, and ship several at o
|
|
|
25
25
|
`ship-it BRANCH ...`, which switches the worktree to each in turn.
|
|
26
26
|
|
|
27
27
|
A hook in each client hands every session [these rules](session.md) when it
|
|
28
|
-
starts.
|
|
29
|
-
in
|
|
30
|
-
|
|
28
|
+
starts. A session keeps one worktree per repository and works on one
|
|
29
|
+
branch at a time in it, starting the next branch there even while the last
|
|
30
|
+
one's pull request waits. It creates a worktree only in a repository where
|
|
31
|
+
it has none before its first change there, or when another session is
|
|
32
|
+
working in its own: uncommitted changes it did not make, or another
|
|
33
|
+
process's lock. In Claude Code it makes one with `EnterWorktree` or
|
|
34
|
+
`gw add`; in Codex it asks for a session started with `codex --worktree`.
|
|
35
|
+
The hook needs
|
|
31
36
|
`jq`, and Codex asks you to review and trust it before it runs.
|
|
32
37
|
|
|
33
38
|
## Install
|
|
@@ -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.12.
|
|
4
|
+
"version": "0.12.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",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# How this session uses worktrees
|
|
2
|
+
|
|
3
|
+
The worktrees plugin hands every session these rules when it starts.
|
|
4
|
+
|
|
5
|
+
- This session keeps one worktree per repository and works on one branch at
|
|
6
|
+
a time in it. In the repository it starts in, that is the worktree it
|
|
7
|
+
starts in, unless that is the main checkout, which stays on the head
|
|
8
|
+
branch. In any repository where it has none, it creates one before its
|
|
9
|
+
first change there and keeps it for every later branch.
|
|
10
|
+
- Branches follow one another in that worktree. Commit and push a branch,
|
|
11
|
+
then start the next with `gw branch create NAME`, even while its pull
|
|
12
|
+
request waits on a review or a merge: switching a branch is much faster
|
|
13
|
+
than creating a worktree, and `git switch --no-guess BRANCH` goes back to
|
|
14
|
+
fix it. A branch that builds on work not merged yet starts from it:
|
|
15
|
+
`git switch --create NAME` while on that branch.
|
|
16
|
+
`/worktrees:ship-it BRANCH ...` ships several, switching to each in turn.
|
|
17
|
+
- When a change the user decided on is implemented and its tests and checks
|
|
18
|
+
pass, ship it without being asked: `/worktrees:ship-it` commits it on its
|
|
19
|
+
own branch, pushes it, opens the pull request, fixes CI and merges it once
|
|
20
|
+
it is ready.
|
|
21
|
+
- Check that no other session is working here before editing, and again
|
|
22
|
+
whenever changes appear that this session did not make. The worktree is
|
|
23
|
+
in use when `git status --short` shows changes this session did not make
|
|
24
|
+
and the user did not ask it to continue, or when
|
|
25
|
+
`git worktree list --porcelain` shows it `locked` by another process.
|
|
26
|
+
Then do not wait, and do not commit, stash or discard those changes:
|
|
27
|
+
create another worktree, run `git switch --create NEW BRANCH` there from
|
|
28
|
+
this worktree's branch, and decide when shipping whether NEW stacks on it.
|
|
29
|
+
- To create a worktree in the repository this session started in, in
|
|
30
|
+
Claude Code, call `EnterWorktree` with a `name`. Anywhere else, run
|
|
31
|
+
`command gw add NAME --quiet` from a checkout of the repository; it
|
|
32
|
+
prints the new worktree's path. Claude Code refuses git aimed outside a
|
|
33
|
+
worktree that `EnterWorktree` opened, and refuses to open a second, so
|
|
34
|
+
leave it first with `ExitWorktree` and `keep`. Its shell returns to the
|
|
35
|
+
start folder after a command that leaves the working directories, so give
|
|
36
|
+
each command the path in full. In Codex, whose sandbox keeps `.git`
|
|
37
|
+
read-only, report it and say to start a session there with
|
|
38
|
+
`codex --worktree`.
|
|
39
|
+
- A subagent that writes gets its own worktree (`isolation: "worktree"`).
|
|
40
|
+
Commit before starting it, and have it start its branch with
|
|
41
|
+
`git switch --create NAME PARENT_BRANCH`, since its worktree starts from
|
|
42
|
+
the default branch.
|
|
43
|
+
- Leave a worktree with `keep`. `gw prune` removes finished ones and lists
|
|
44
|
+
what it deletes first; `ExitWorktree` removal deletes ignored files without
|
|
45
|
+
asking. Never remove or switch another session's worktree.
|
|
@@ -47,10 +47,15 @@ prefix_rule(
|
|
|
47
47
|
justification="ship-it starts a branch",
|
|
48
48
|
)
|
|
49
49
|
prefix_rule(
|
|
50
|
-
pattern=["gw", ["fast-forward", "ci-checks"]],
|
|
50
|
+
pattern=["gw", ["sync", "fast-forward", "ci-checks"]],
|
|
51
51
|
decision="allow",
|
|
52
52
|
justification="ship-it fetches, rebases and reads CI",
|
|
53
53
|
)
|
|
54
|
+
prefix_rule(
|
|
55
|
+
pattern=["git", "switch", ["--create", "--no-guess"]],
|
|
56
|
+
decision="allow",
|
|
57
|
+
justification="ship-it starts a branch or moves to a named one",
|
|
58
|
+
)
|
|
54
59
|
prefix_rule(
|
|
55
60
|
pattern=["git", ["add", "commit"]],
|
|
56
61
|
decision="allow",
|
|
@@ -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.12.
|
|
12
|
+
version = "0.12.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.
|