summaryrefslogtreecommitdiff
path: root/GIT-VERSION-GEN
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2010-05-12 03:29:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-05-12 06:04:23 (GMT)
commit3368edd4cda6306d524e10758e2c5a187dcd4ba6 (patch)
treeab83b5dd880a53495065e395086c134379f16276 /GIT-VERSION-GEN
parent87a074df2455f305df8facc22e85dac1cfeb0d6b (diff)
downloadgit-3368edd4cda6306d524e10758e2c5a187dcd4ba6.zip
git-3368edd4cda6306d524e10758e2c5a187dcd4ba6.tar.gz
git-3368edd4cda6306d524e10758e2c5a187dcd4ba6.tar.bz2
GIT-VERSION-GEN: restrict tags used
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>
Diffstat (limited to 'GIT-VERSION-GEN')
-rwxr-xr-xGIT-VERSION-GEN2
1 files changed, 1 insertions, 1 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 0ad3948..82fd726 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -12,7 +12,7 @@ if test -f version
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]*)