summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-06-24 13:48:48 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-06-24 13:48:49 -0700
commit9f19e0c31043f15ad51c08a8660a3b6fb32646a1 (patch)
tree28e81ec6a50a4ee205eaa6351daddbad59ddf085
parentMerge branch 'dk/maint-t5150-dirname' (diff)
parentGIT-VERSION-GEN: support non-standard $GIT_DIR path (diff)
downloadtgif-9f19e0c31043f15ad51c08a8660a3b6fb32646a1.tar.xz
Merge branch 'dk/version-gen-gitdir'
Allow packaging a tarball in a working tree with $GIT_DIR set elsewhere. * dk/version-gen-gitdir: GIT-VERSION-GEN: support non-standard $GIT_DIR path
-rwxr-xr-xGIT-VERSION-GEN2
1 files changed, 1 insertions, 1 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 390782fa12..b4d4e5045f 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) ;;