Development record
ahoy's hooksPathArmed reads core.hooksPath raw with git config --local --get and joins a non-absolute value to the clone, so a ~/ spelling of the committed .githooks directory (which git expands to the same directory) reads as unarmed, and the status line advises re-arming a clone whose name guard already runs. Sibling of iss-2609261004261615: judge the path git expands (--type=path).
issueresolvedminoriss-2609261013469387
ahoy's hooksPathArmed reads core.hooksPath raw with git config --local --get and joins a non-absolute value to the clone, so a ~/ spelling of the committed .githooks directory (which git expands to the same directory) reads as unarmed, and the status line advises re-arming a clone whose name guard already runs. Sibling of iss-2609261004261615: judge the path git expands (--type=path).
Grounds
- pursued: a clone armed through a ~/ spelling of its own .githooks is reported armed; a git whose --type=path expansion differs from the directory it runs hooks from would show it wrong
Frontmatter
| id | iss-2609261013469387 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2609261013469387-ahoy-s-hookspatharmed-reads-core.md
open on GitHub ↗ · commit history ↗
mentions1
- iss-2609261004261615lab preflight isolation.hooks reads core.hooksPath raw with git config --get and judges the unexpanded text: a %(prefix)/... value (git expands it to its install prefix) is treated as snapshot-relative and passes as resolving inside the lab, a false PASS on the operator-state route; the ~user branch is a hand-rolled special case of the same gap. Judge the path git itself expands (git config --type=path --get) and refuse any expanded path outside the lab.