summaryrefslogtreecommitdiff
path: root/GIT-VERSION-GEN
diff options
context:
space:
mode:
authorLibravatar Dennis Kaarsemaker <dennis@kaarsemaker.net>2013-06-16 01:01:11 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-06-17 13:09:17 -0700
commit05a950630e67f3acf7a349b579d28eebe9143a72 (patch)
treec4380c47988c122fdc5c2249fdc7de720697e03e /GIT-VERSION-GEN
parentfast-export: fix argument name in error messages (diff)
downloadtgif-05a950630e67f3acf7a349b579d28eebe9143a72.tar.xz
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>
Diffstat (limited to 'GIT-VERSION-GEN')
-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) ;;