summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-21 22:51:41 -0700
committerJunio C Hamano <gitster@pobox.com>2013-07-21 22:51:41 -0700
commit25b3e4fffd88258c6150bf9b088506f438ccb100 (patch)
tree08a8aa30c8c9ab068431ad8bcc748cece4d2260d
parentb6538a0b4eee113d207961bacc1abb6ac5b2e661 (diff)
parent05a950630e67f3acf7a349b579d28eebe9143a72 (diff)
downloadgit-25b3e4fffd88258c6150bf9b088506f438ccb100.tar.gz
Merge branch 'dk/version-gen-gitdir' into maint
* dk/version-gen-gitdir: GIT-VERSION-GEN: support non-standard $GIT_DIR path
-rwxr-xr-xGIT-VERSION-GEN2
1 files changed, 1 insertions, 1 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 8ddaa16ac1..b8b8457735 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -11,7 +11,7 @@ LF='
if test -f version
then
VN=$(cat version) || VN="$DEF_VER"
-elif test -d .git -o -f .git &&
+elif test -d ${GIT_DIR:-.git} -o -f .git &&
VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;