1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-26 02:26:11 +02:00

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 <dennis@kaarsemaker.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Dennis Kaarsemaker 2013-06-16 01:01:11 +02:00 committed by Junio C Hamano
parent 04a74b6cfa
commit 05a950630e

View File

@ -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) ;;