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>
Christian Couder committed
Oct 1, 2006 at 22:33 UTC
b431b2822f361efcb940adbc1f2097e122e90ed9
1 file changed
+1
-1
git-tag.sh
+1
-1
@@ -66,7 +66,7 @@ done
66
name="$1"
67
[ "$name" ] || usage
68
prev=0000000000000000000000000000000000000000
69
-if test -e "$GIT_DIR/refs/tags/$name"
69
+if git-show-ref --verify --quiet -- "refs/tags/$name"
70
then
71
test -n "$force" || die "tag '$name' already exists"
72
prev=`git rev-parse "refs/tags/$name"`