From: Christian Couder <chriscool@tuxfamily.org>
To: Junio Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] Check that a tag exists using show-ref instead of looking for the ref file.
Date: Sun, 1 Oct 2006 22:33:04 +0200 [thread overview]
Message-ID: <20061001223304.d37df36f.chriscool@tuxfamily.org> (raw)
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
next reply other threads:[~2006-10-01 20:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-01 20:33 Christian Couder [this message]
2006-10-03 9:09 ` [PATCH] Check that a tag exists using show-ref instead of looking for the ref file Junio C Hamano
2006-10-03 20:11 ` Christian Couder
2006-10-03 20:26 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061001223304.d37df36f.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).