The pre-commit hook runs the dev tests with GIT_DIR and GIT_INDEX_FILE set to the real repo; the temp-repo helper inherited them, so every commit that touched dev/ failed at 'git checkout -b feature' (exit 128) while the same test passed from a plain shell.