search tried in the issue tracker
stages: [commit-msg] --commit-msg-filename
describe your issue
I am trying to make a hook that checks commit messages. I tried to use the try-repo together with --commit-msg-filename. I passed an arbitrary filename and did not realize that this file actually needs to exist.
I might be stupid for not realizing this earlier, but in order to ease the pain for others, if the file does not exists, maybe pass the filename to the hook in any case or maybe raise an exception.
Added .pre-commit-hooks.yaml.
pre-commit --version
pre-commit 2.19.0
.pre-commit-config.yaml
- id: auto-git-messsage
name: Generate git message
description: This hook trims trailing whitespace.
entry: create_message
language: python
stages: [commit-msg]
~/.cache/pre-commit/pre-commit.log (if present)
No response