Merge branch 'dk/version-gen-gitdir' into maint
authorJunio C Hamano <gitster@pobox.com>
Mon, 22 Jul 2013 05:51:41 +0000 (22:51 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Jul 2013 05:51:41 +0000 (22:51 -0700)
* dk/version-gen-gitdir:
GIT-VERSION-GEN: support non-standard $GIT_DIR path

GIT-VERSION-GEN
index 8ddaa16ac1ee8936cde50a75e30905c62d0709d7..b8b8457735669f2acc6adcf9271c482ef713ad0f 100755 (executable)
@@ -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) ;;