From: Dennis Kaarsemaker Date: Sat, 15 Jun 2013 23:01:11 +0000 (+0200) Subject: GIT-VERSION-GEN: support non-standard $GIT_DIR path X-Git-Tag: v1.8.3.4~5^2 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fgit.git;a=commitdiff_plain;h=05a950630e67f3acf7a349b579d28eebe9143a72;hp=04a74b6cfa5ef4870263f84ac94a488d9f2ef14a GIT-VERSION-GEN: support non-standard $GIT_DIR path make and make test both work when $GIT_DIR isn't .git, but make dist included a bogus GIT-VERSION-FILE. Signed-off-by: Dennis Kaarsemaker Signed-off-by: Junio C Hamano --- diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 2908204894..91ec831b0e 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) ;;