diff options
author | Dennis Kaarsemaker <dennis@kaarsemaker.net> | 2013-06-16 01:01:11 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-17 13:09:17 -0700 |
commit | 05a950630e67f3acf7a349b579d28eebe9143a72 (patch) | |
tree | c4380c47988c122fdc5c2249fdc7de720697e03e | |
parent | fast-export: fix argument name in error messages (diff) | |
download | tgif-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>
-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 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) ;; |