diff options
author | Tay Ray Chuan <rctay89@gmail.com> | 2010-05-12 11:29:20 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-11 23:04:23 -0700 |
commit | 3368edd4cda6306d524e10758e2c5a187dcd4ba6 (patch) | |
tree | ab83b5dd880a53495065e395086c134379f16276 /GIT-VERSION-GEN | |
parent | handle "git --bare init <dir>" properly (diff) | |
download | tgif-3368edd4cda6306d524e10758e2c5a187dcd4ba6.tar.xz |
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-x | GIT-VERSION-GEN | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 0ad39484ec..82fd72652b 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]*) |