Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
GIT-VERSION-GEN: support non-standard $GIT_DIR path
author
Dennis Kaarsemaker
<dennis@kaarsemaker.net>
Sat, 15 Jun 2013 23:01:11 +0000
(
01:01
+0200)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 17 Jun 2013 20:09:17 +0000
(13:09 -0700)
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>
GIT-VERSION-GEN
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
04a74b6
)
diff --git
a/GIT-VERSION-GEN
b/GIT-VERSION-GEN
index 2908204894c33111075ad6b8c4b56bcacec08131..91ec831b0e5e5923bbc43b4900ed3f283ce67ff1 100755
(executable)
--- 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) ;;