git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Check that a tag exists using show-ref instead of looking for the ref file.
@ 2006-10-01 20:33 Christian Couder
  2006-10-03  9:09 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Couder @ 2006-10-01 20:33 UTC (permalink / raw)
  To: Junio Hamano; +Cc: git

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-03 20:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-01 20:33 [PATCH] Check that a tag exists using show-ref instead of looking for the ref file Christian Couder
2006-10-03  9:09 ` Junio C Hamano
2006-10-03 20:11   ` Christian Couder
2006-10-03 20:26     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).