From: Christian Couder Date: Sun, 01 Oct 2006 20:33:04 GMT Subject: [PATCH] Check that a tag exists using show-ref instead of looking for the ref file. Message-ID: <20061001223304.d37df36f.chriscool@tuxfamily.org> Signed-off-by: Christian Couder --- git-tag.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/git-tag.sh b/git-tag.sh index 6463b31..a3f1819 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"` -- 1.4.2.1.gd567