ci: stale .git/hooks/pre-commit shadow copy misleads diagnosis — dev/hooks + sem.hooks are authoritative #599
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
A pre-sem.hooks bash copy of the pre-commit hook survived in
.git/hooks/pre-commit(untracked, from before core.hooksPath=dev/hooks). It is inert — git runsdev/hooks/pre-commit→python -m sem.hooks, which already scopes pytest to changed modules and runs-n auto— but reading the stale copy as "the hook" cost a debugging session two 15-minute serial full-suite runs today while chasing #598. Removed the stale copy from this clone. README (§Pre-commit hooks) already documents the correct setup; no repo change needed beyond awareness. If other clones exist,rm .git/hooks/pre-committhere too.Resolved in-clone:
rm .git/hooks/pre-commit; verifiedgit config core.hooksPath→dev/hooksandgit rev-parse --git-path hooks→dev/hooks, sosem.hooks(scoped +-n auto, src/sem/hooks.py:312-320) is what actually gates commits. No tracked-file change required — closing.