Development record
The pre-commit hook ahoy install scaffolds into adopted repositories (internal/core/ahoy/defaults/pre-commit, header lines 8-10) still tells every clone to run 'git config core.hooksPath .githooks' unconditionally, which shadows a foreign global hooks dispatcher instead of having it call .githooks/. A third sibling of the advice iss-2610101903385281 made conditional in CONTRIBUTING.md and the commit-msg hook; found by that lane's review (run-2610111657473488, PR #939).
issueresolvedminoriss-2610111820465940
The pre-commit hook ahoy install scaffolds into adopted repositories (internal/core/ahoy/defaults/pre-commit, header lines 8-10) still tells every clone to run 'git config core.hooksPath .githooks' unconditionally, which shadows a foreign global hooks dispatcher instead of having it call .githooks/. A third sibling of the advice iss-2610101903385281 made conditional in CONTRIBUTING.md and the commit-msg hook; found by that lane's review (run-2610111657473488, PR #939).
Grounds
- pursued: an adopted repository's scaffolded pre-commit no longer tells a clone under a global hooks dispatcher to set a local core.hooksPath; a setsHooksPath match in internal/core/ahoy/defaults/pre-commit outside its unarmed comment bullet, or a missing armed/unarmed/foreign bullet, would show it wrong, and the sibling test would fail on it.
Frontmatter
| id | iss-2610111820465940 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2610111820465940-the-pre-commit-hook-ahoy-install.md
open on GitHub ↗ · commit history ↗
mentions3
- iss-2610101903385281Two siblings of the core.hooksPath advice that prepare-this-repo now makes conditional still give it unconditionally. .github/CONTRIBUTING.md (around line 64) tells every clone to run git config core.hooksPath .githooks, and the commit-msg hook's 'no abcd source' refusal (.githooks/commit-msg around line 162) prints the same command. On a machine whose global hooks dispatcher is in force (ahoy's banlist.hooks_path reports foreign), either one overrides that dispatcher instead of having it call .githooks/. The 2026-10-10 drain lane's reviewer found them; that lane's remedy did not cover them.
- iss-2610112148115897The prepare-commit-msg hook ahoy install scaffolds into adopted repositories (internal/core/ahoy/defaults/prepare-commit-msg, header lines 20-22) still tells every clone to run 'git config core.hooksPath .githooks' unconditionally, shadowing a foreign global hooks dispatcher. The fourth sibling of the advice iss-2610101903385281 made conditional, found by the lane for iss-2610111820465940 (the scaffolded pre-commit). A sweep of every core.hooksPath mention on main at 2026-10-11 found no other unconditional instruction.
- iss-2610112155207746ahoy install writes its scaffolded guard hooks into an adopted repository only when they are missing (internal/core/ahoy/banlist_scaffold.go, the banlist.hook_missing branch through createContained), and never rewrites an installed v1 hook. So a repository that ran ahoy before a fix to a scaffolded hook keeps the old text: after iss-2610111820465940 and iss-2610112148115897 make the core.hooksPath advice conditional, every earlier adopter's committed .githooks/pre-commit and prepare-commit-msg keep the unconditional header, and ahoy reports no gap for it. Found by the ruthless review of the lane for iss-2610111820465940.