1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-24 16:36:21 +02:00

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>
This commit is contained in:
Tay Ray Chuan 2010-05-12 11:29:20 +08:00 committed by Junio C Hamano
parent 87a074df24
commit 3368edd4cd

View File

@ -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]*)