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 | 9a3f5986f7da15d490e8aa3977dd7384f1eef9dd (diff) | |
parent | 05a950630e67f3acf7a349b579d28eebe9143a72 (diff) | |
download | git-9f19e0c31043f15ad51c08a8660a3b6fb32646a1.tar.gz |
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) ;; |