summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kaarsemaker <dennis@kaarsemaker.net>2013-06-16 01:01:11 +0200
committerJunio C Hamano <gitster@pobox.com>2013-06-17 13:09:17 -0700
commit05a950630e67f3acf7a349b579d28eebe9143a72 (patch)
treec4380c47988c122fdc5c2249fdc7de720697e03e
parent04a74b6cfa5ef4870263f84ac94a488d9f2ef14a (diff)
downloadgit-05a950630e67f3acf7a349b579d28eebe9143a72.tar.gz
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>
-rwxr-xr-xGIT-VERSION-GEN2
1 files changed, 1 insertions, 1 deletions
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) ;;