Browse Source

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>
maint
Christian Couder 19 years ago committed by Junio C Hamano
parent
commit
b431b2822f
  1. 2
      git-tag.sh

2
git-tag.sh

@ -66,7 +66,7 @@ done @@ -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"`

Loading…
Cancel
Save