1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-05 00:37:55 +01:00

Check that a tag exists using show-ref instead of looking for the ref file.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Christian Couder 2006-10-01 22:33:04 +02:00 committed by Junio C Hamano
parent d3d0013c59
commit b431b2822f

View file

@ -66,7 +66,7 @@ done
name="$1"
[ "$name" ] || usage
prev=0000000000000000000000000000000000000000
if test -e "$GIT_DIR/refs/tags/$name"
if git-show-ref --verify --quiet -- "refs/tags/$name"
then
test -n "$force" || die "tag '$name' already exists"
prev=`git rev-parse "refs/tags/$name"`