summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ba88a1f)
raw | patch | inline | side by side (parent: ba88a1f)
author | Lars Hjemli <hjemli@gmail.com> | |
Wed, 20 Feb 2008 22:13:16 +0000 (23:13 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 9 Apr 2008 08:22:50 +0000 (01:22 -0700) |
The presence of a .git directory used to be good enough evidence that
GIT-VERSION-GEN could use 'git describe' to get a version number. But
now .git might as well be a file so the test must be extended to cater for
such setups.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
GIT-VERSION-GEN could use 'git describe' to get a version number. But
now .git might as well be a file so the test must be extended to cater for
such setups.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
GIT-VERSION-GEN | patch | blob | history |
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index f60bab896bd9a54714eff3596e38c9ffb9d38ac8..3cabc92e7a1f8ce30eb6e5151a4c81c82468bcee 100755 (executable)
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
if test -f version
then
VN=$(cat version) || VN="$DEF_VER"
-elif test -d .git &&
+elif test -d .git -o -f .git &&
VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;