Imported Upstream version 2.9.2
[platform/upstream/git.git] / GIT-VERSION-GEN
index b09d264..09f1228 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v1.8.0
+DEF_VER=v2.9.2
 
 LF='
 '
@@ -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) ;;
@@ -38,5 +38,3 @@ test "$VN" = "$VC" || {
        echo >&2 "GIT_VERSION = $VN"
        echo "GIT_VERSION = $VN" >$GVF
 }
-
-