summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 87a074d)
raw | patch | inline | side by side (parent: 87a074d)
author | Tay Ray Chuan <rctay89@gmail.com> | |
Wed, 12 May 2010 03:29:20 +0000 (11:29 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 12 May 2010 06:04:23 +0000 (23:04 -0700) |
Restrict the tags used to generate the version string to those that
begin with "v", since git's tags for git-core (ie. excluding git-gui)
are all of the form "vX.Y...".
This is to avoid using private tags by the user in a clone of the git
code repository, which may break certain machinery (eg. Makefile, gitk).
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
begin with "v", since git's tags for git-core (ie. excluding git-gui)
are all of the form "vX.Y...".
This is to avoid using private tags by the user in a clone of the git
code repository, which may break certain machinery (eg. Makefile, gitk).
Signed-off-by: Tay Ray Chuan <rctay89@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 0ad39484eceab30360e1f46c6057a873ca2c26f1..82fd72652b6d35837b8786005024263ac61630dd 100755 (executable)
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
then
VN=$(cat version) || VN="$DEF_VER"
elif test -d .git -o -f .git &&
- VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
+ VN=$(git describe --match "v[0-9]*" --abbrev=4 HEAD 2>/dev/null) &&
case "$VN" in
*$LF*) (exit 1) ;;
v[0-9]*)