Pass parameters to prepare-commit-msg hook

This commit is contained in:
Talia 2022-05-27 10:50:02 +02:00
parent 357a404895
commit de77f6c33c

View file

@ -1,11 +1,13 @@
#!/bin/sh
hook=$(basename $0)
if [ -z "$GIT_DIR" ]
then
GIT_DIR=$(git rev-parse --show-toplevel)/.git
fi
if [ -f $GIT_DIR/hooks/$hook ]
then
echo Running project-level hook: $GIT_DIR/hooks/$hook
$GIT_DIR/hooks/$hook
$GIT_DIR/hooks/$hook $@
fi