aboutsummaryrefslogtreecommitdiff
path: root/git-hooks
diff options
context:
space:
mode:
Diffstat (limited to 'git-hooks')
-rwxr-xr-xgit-hooks12
1 files changed, 8 insertions, 4 deletions
diff --git a/git-hooks b/git-hooks
index 9c40e14..4ac5bc0 100755
--- a/git-hooks
+++ b/git-hooks
@@ -28,10 +28,14 @@
function hook_dirs
{
- hook="${1}"
- echo "${HOME}/.git_hooks/${hook}"
- echo "${PWD}/git_hooks/${hook}"
- echo "`git config hooks.global`"/${hook}
+ if [ ! -z "${1}" ] ; then
+ hook="/${1}"
+ else
+ hook=""
+ fi
+ echo "${HOME}/.git_hooks${hook}"
+ echo "${PWD}/git_hooks${hook}"
+ echo "`git config hooks.global`"${hook}
}
function list_hooks_in_dir