|
I wrote a patch and accidentally introduced a typo in the commit message.
This didn't get detected because codespell-log didn't run.
I installed pre-commit on that setup a while back, before codespell-log was
around and consequently only the .git/hooks/pre-commit script was installed.
This is a bit hard to notice given that all other hooks do run.
Add a pre-commit check that checks for this situation:
...
$ rm .git/hooks/commit-msg
$ git commit --amend
...
pre-commit-setup........................................................Failed
- hook id: pre-commit-setup
- exit code: 1
missing hook: .git/hooks/commit-msg (please run pre-commit install)
...
$
...
This is a bit niche, but worthwhile if you're using a dozen build and test
installations.
|