diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2006-10-02 00:33:04 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-10-02 02:17:48 +0400 |
commit | b431b2822f361efcb940adbc1f2097e122e90ed9 (patch) | |
tree | 2ded7797a7119118f4d9bce3dd60615bebbc9622 /git-tag.sh | |
parent | d3d0013c59ed840520b86a65697137cb2c62819c (diff) |
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-x | git-tag.sh | 2 |
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"` |