diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-24 13:48:48 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-24 13:48:49 -0700 |
commit | 9f19e0c31043f15ad51c08a8660a3b6fb32646a1 (patch) | |
tree | 28e81ec6a50a4ee205eaa6351daddbad59ddf085 /GIT-VERSION-GEN | |
parent | Merge branch 'dk/maint-t5150-dirname' (diff) | |
parent | GIT-VERSION-GEN: support non-standard $GIT_DIR path (diff) | |
download | tgif-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
Diffstat (limited to 'GIT-VERSION-GEN')
-rwxr-xr-x | GIT-VERSION-GEN | 2 |
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) ;; |