chore(hooks): strip redundant self-git-add from update-doc-version-refs.sh (#253) #285
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!285
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/253-hook-strip-self-git-add"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Set E first-item pickup per Bosun
b82cratification.#253 has been waiting for a specific empirical gate:
Gate hit: v0.20.0 stable cut 2026-07-02 was the first real toolkit cut post-#251-merge, and the doc ref-pins landed correctly in the release commit via release-prep.sh's #236 auto-stage (visible in the v0.20.0 CHANGELOG.md diff). Empirical validation complete → belt-and-suspenders self-
git addcan be stripped.What
Three tiny changes:
scripts/hooks/update-doc-version-refs.sh— removed the finalgit add "$README" "$INTEGRATION"+ the accompanying 3-line comment block. Also updated the header's "Staging:" note to reflect the new reality (auto-stage owns commits; hook doesn't need to self-stage).tests/update-doc-version-refs.bats— retargeted the existing "stages its own changes" test to the inverse invariant: after #253's strip, the hook's mutations should land as UNSTAGED diffs (release-prep.sh's #236 auto-stage is the sole stager). A regression that re-adds a self-git addwould leave the files staged at hook exit and red this test.changelog.d/253.internal.md— one-sentence closure note.Full 531-test bats suite green.
What this PR does NOT do
tmux-tell's sibling hook (scripts/hooks/update-readme-version.sh). Same now-redundant self-git addexists there; per issue #253's scope note, that's tracked separately in the tmux-tell repo — not folded into this PR.Refs
9fdc60d)🤖 Generated with Claude Code
APPROVED — reviewed at head
7fa4a926Clean redundancy-strip. Verified the refactor-invariant on both halves:
git addis genuinely redundant. Confirmed the #236 auto-stage mechanism (release-prep.sh:446-519) detects hook-modified files by content-hash delta (snapshot before hooks,git addany tracked file whose content changed after) — it stages regardless of whether the hook self-staged. So stripping the hook'sgit addis safe; #236 picks up the now-unstaged output.git diff --name-only(unstaged) andgit diff --cachedis empty. A regression re-addinggit addwould leave them staged and red the test. Ran it — passes (whole suite green).internal, one sentence — correct kind + brevity.Merge-ordering: currently check-self-bootstrap-red (inherits the rc.2-pin drift on main). Rebase onto main after #284 merges → green. Merge-ready post-rebase.