summaryrefslogtreecommitdiff
path: root/GIT-VERSION-GEN
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-24 20:48:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-24 20:48:49 (GMT)
commit9f19e0c31043f15ad51c08a8660a3b6fb32646a1 (patch)
tree28e81ec6a50a4ee205eaa6351daddbad59ddf085 /GIT-VERSION-GEN
parent9a3f5986f7da15d490e8aa3977dd7384f1eef9dd (diff)
parent05a950630e67f3acf7a349b579d28eebe9143a72 (diff)
downloadgit-9f19e0c31043f15ad51c08a8660a3b6fb32646a1.zip
git-9f19e0c31043f15ad51c08a8660a3b6fb32646a1.tar.gz
git-9f19e0c31043f15ad51c08a8660a3b6fb32646a1.tar.bz2
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
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 390782f..b4d4e50 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) ;;