diff options
author | Benjamin C Meyer <ben@meyerhome.net> | 2010-06-19 16:17:26 -0400 |
---|---|---|
committer | Benjamin C Meyer <ben@meyerhome.net> | 2010-06-19 16:17:26 -0400 |
commit | 51eb63805b0f975d26fdebc1726366ebc7e13a35 (patch) | |
tree | 30de64a90dfa1b79b62ddb2cfc3e3ae530c7fcc8 | |
parent | 0f8f2c371a56636428208348f3bce36d6a63a371 (diff) | |
download | git-hooks-51eb63805b0f975d26fdebc1726366ebc7e13a35.tar.gz git-hooks-51eb63805b0f975d26fdebc1726366ebc7e13a35.tar.bz2 |
When listing hooks don't change the cwd, just use the GITDIR variable
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
-rwxr-xr-x | git-hooks | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -114,8 +114,7 @@ git-hooks run "$0" "$@"' > "${file}" function list_hooks { GITDIR=`git rev-parse --git-dir` - cd $GITDIR - cat hooks/pre-commit 2> /dev/null | grep 'git-hooks' > /dev/null 2> /dev/null + cat $GITDIR/hooks/pre-commit 2> /dev/null | grep 'git-hooks' > /dev/null 2> /dev/null if [ $? = 0 ] ; then echo "Git hooks ARE installed in this repository." echo "" |