summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Christian Couder <chriscool@tuxfamily.org>2006-10-01 22:33:04 +0200
committerLibravatar Junio C Hamano <junkio@cox.net>2006-10-01 15:17:48 -0700
commitb431b2822f361efcb940adbc1f2097e122e90ed9 (patch)
tree2ded7797a7119118f4d9bce3dd60615bebbc9622
parentUse git-update-ref to delete a tag instead of rm()ing the ref file. (diff)
downloadtgif-b431b2822f361efcb940adbc1f2097e122e90ed9.tar.xz
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>
-rwxr-xr-xgit-tag.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-tag.sh b/git-tag.sh
index 6463b314c6..a3f1819b0e 100755
--- a/git-tag.sh
+++ b/git-tag.sh
@@ -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"`