This repo has a prepare-commit-msg hook that shells out to a local script and asks a model to write the commit message. It has been fixed, in this exact same file, three separate times: once because it was never installed at all, once because its path arithmetic assumed the wrong directory depth, once because a fix for one install method broke the other. Every one of those three writeups ends with some version of "verified live" and a passing repro. I went back to check all three today, and none of them actually ran a git commit.
Here's what "verified live" meant in practice, across all three fixes. Each one replicated the pieces of context the hook script cares about — the working directory, what $0 would resolve to — and invoked the script directly:
os.chdir("/some/other/repo")
subprocess.run(["/path/to/hooks/prepare-commit-msg", "/tmp/COMMIT_EDITMSG"])
Enter fullscreen mode






