fix the pre-commit hook's path, missed by the rename
ADR-0082 moved docs/ to harness/ and left scripts/hooks/pre-commit staging docs/surface.md. The hook runs on every commit, so the very commit that did the rename hit it: `git add docs/surface.md` failed with a fatal, the commit otherwise succeeded, and surface.md went in only because it had been staged by hand beforehand. The sweep missed it because the file has no extension and the grep that found every other reference was filtered by --include='*.sh'. HARNESS.md now says so where the hook is described, since the next rename will make the same mistake for the same reason. Verified by this commit: the hook ran, regenerated harness/surface.md, and staged it without error. 2 files. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@ cd "$(git rev-parse --show-toplevel)" || exit 1
|
||||
# Checked before generating, because a staged deletion also breaks the generator.
|
||||
unstaged=$(git diff --name-only -- '*.go')
|
||||
if [ -n "$unstaged" ]; then
|
||||
printf 'FAIL unstaged .go changes — docs/surface.md would describe code this commit lacks:\n'
|
||||
printf 'FAIL unstaged .go changes — harness/surface.md would describe code this commit lacks:\n'
|
||||
printf ' %s\n' $unstaged
|
||||
printf ' stage them, stash them, or commit with --no-verify and say why in the body.\n'
|
||||
exit 1
|
||||
@@ -23,6 +23,6 @@ fi
|
||||
# One generated artifact, so one call. A second one makes this a two-line list; it does not make it a
|
||||
# registry (CLAUDE.md rule 1).
|
||||
./scripts/surface.sh --write >/dev/null || exit 1
|
||||
git add docs/surface.md
|
||||
git add harness/surface.md
|
||||
|
||||
exec ./scripts/verify.sh --quiet
|
||||
|
||||
Reference in New Issue
Block a user