Current test for GIT_DIR introduced in changeset Ie1560c372e23e58fb0e310f681388b5e1a65ba5b doesn't seem to be working correctly on bash 4.3.18 : .git/hooks/pre-commit: line 11: .git: command not found

This test works correctly in bash/dash/zsh

Change-Id: Ic89fc2764d1a70e9e5d112c7928cee6ed783f50f
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/2092
Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
Anish Bhatt 2014-06-09 17:10:44 -07:00 committed by Evan Huus
parent 9516675ca7
commit 8878d7778e
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@
# http://mark-story.com/posts/view/using-git-commit-hooks-to-prevent-stupid-mistakes
#
"$GIT_DIR" || GIT_DIR=.git
if [ -z $GIT_DIR ]; then GIT_DIR=".git"; fi
# Check for newer versions of the pre-commit script
if [ ${GIT_DIR}/hooks/pre-commit -ot ./tools/pre-commit ] ; then
echo "Pre-commit hook script is outdated, please update!"