aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin C Meyer <ben@meyerhome.net>2010-06-19 16:17:03 -0400
committerBenjamin C Meyer <ben@meyerhome.net>2010-06-19 16:17:03 -0400
commit0f8f2c371a56636428208348f3bce36d6a63a371 (patch)
treecc0533fb943f78e6401e3f55fa6850a91933b6e1
parent92eeee246251f7247c765814ea69bbecaf961f0a (diff)
downloadgit-hooks-0f8f2c371a56636428208348f3bce36d6a63a371.tar.gz
git-hooks-0f8f2c371a56636428208348f3bce36d6a63a371.tar.bz2
When listing the hook_dirs use GITDIR for the project hooks
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
-rwxr-xr-xgit-hooks2
1 files changed, 2 insertions, 0 deletions
diff --git a/git-hooks b/git-hooks
index 171a916..0acc6e3 100755
--- a/git-hooks
+++ b/git-hooks
@@ -34,6 +34,8 @@ function hook_dirs
hook=""
fi
echo "${HOME}/.git_hooks${hook}"
+ GITDIR=`git rev-parse --git-dir`
+ cd $GITDIR/..
echo "${PWD}/git_hooks${hook}"
eval echo "`git config hooks.global`"${hook}
}