aboutsummaryrefslogtreecommitdiff
path: root/git-tag.sh
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2006-10-01 22:33:04 +0200
committerJunio C Hamano <junkio@cox.net>2006-10-01 15:17:48 -0700
commitb431b2822f361efcb940adbc1f2097e122e90ed9 (patch)
tree2ded7797a7119118f4d9bce3dd60615bebbc9622 /git-tag.sh
parentd3d0013c59ed840520b86a65697137cb2c62819c (diff)
downloadgit-b431b2822f361efcb940adbc1f2097e122e90ed9.tar.gz
git-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>
Diffstat (limited to 'git-tag.sh')
-rwxr-xr-xgit-tag.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-tag.sh b/git-tag.sh
index 6463b314c..a3f1819b0 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"`