Pass parameters to prepare-commit-msg hook
This commit is contained in:
parent
357a404895
commit
de77f6c33c
1 changed files with 3 additions and 1 deletions
|
@ -1,11 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
hook=$(basename $0)
|
hook=$(basename $0)
|
||||||
|
|
||||||
if [ -z "$GIT_DIR" ]
|
if [ -z "$GIT_DIR" ]
|
||||||
then
|
then
|
||||||
GIT_DIR=$(git rev-parse --show-toplevel)/.git
|
GIT_DIR=$(git rev-parse --show-toplevel)/.git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $GIT_DIR/hooks/$hook ]
|
if [ -f $GIT_DIR/hooks/$hook ]
|
||||||
then
|
then
|
||||||
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
echo Running project-level hook: $GIT_DIR/hooks/$hook
|
||||||
$GIT_DIR/hooks/$hook
|
$GIT_DIR/hooks/$hook $@
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue