From: Christian Couder Date: Sun, 1 Oct 2006 20:33:04 +0000 (+0200) Subject: Check that a tag exists using show-ref instead of looking for the ref file. X-Git-Tag: v1.4.4-rc1~44^2~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b431b2822f361efcb940adbc1f2097e122e90ed9;p=git.git Check that a tag exists using show-ref instead of looking for the ref file. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- 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"`