Adds a commit-msg git hook

People may wish to configure a `commit-msg` hook in their local
dotfiles.

This allows them to do so by adding a [`commit-msg` git hook][1] that
checks for the presence of a local `commit-msg` hook, and runs it if
present. This hook follows the existing pattern we use for other git
hooks.

[1]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
This commit is contained in:
Eebs Kobeissi 2019-11-18 09:23:38 -05:00
parent d27cceb0be
commit eeb52a87f6

7
git_template/hooks/commit-msg Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
local_hook="$HOME"/.git_template.local/hooks/commit-msg
if [ -f "$local_hook" ]; then
. "$local_hook"
fi