* [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
* Re: [PATCH] Check that a tag exists using show-ref instead of looking for the ref file.
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
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2006-10-03 9:09 UTC (permalink / raw)
To: Christian Couder; +Cc: git
Thanks. We also need this to avoid refetching already packed
tags.
-- >8 --
[PATCH] git-fetch: do not look into $GIT_DIR/refs to see if a tag exists.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
git-fetch.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-fetch.sh b/git-fetch.sh
index f1522bd..e8a7668 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -417,7 +417,7 @@ case "$no_tags$tags" in
sed -ne 's|^\([0-9a-f]*\)[ ]\(refs/tags/.*\)^{}$|\1 \2|p' |
while read sha1 name
do
- test -f "$GIT_DIR/$name" && continue
+ git-show-ref --verify --quiet -- $name && continue
git-check-ref-format "$name" || {
echo >&2 "warning: tag ${name} ignored"
continue
--
1.4.2.3.gd1e9e
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Check that a tag exists using show-ref instead of looking for the ref file.
2006-10-03 9:09 ` Junio C Hamano
@ 2006-10-03 20:11 ` Christian Couder
2006-10-03 20:26 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Christian Couder @ 2006-10-03 20:11 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano wrote:
> Thanks. We also need this to avoid refetching already packed
> tags.
Yeah, I did a very quick check on the shell scripts and I obviously missed
some places that need updates.
In fact, I couldn't resist to start implementing the deleted-refs/$frotz~ref
stuff we talked about...
Christian.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Check that a tag exists using show-ref instead of looking for the ref file.
2006-10-03 20:11 ` Christian Couder
@ 2006-10-03 20:26 ` Junio C Hamano
0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2006-10-03 20:26 UTC (permalink / raw)
To: Christian Couder; +Cc: git
Christian Couder <chriscool@tuxfamily.org> writes:
> Junio C Hamano wrote:
>> Thanks. We also need this to avoid refetching already packed
>> tags.
>
> Yeah, I did a very quick check on the shell scripts and I obviously missed
> some places that need updates.
>
> In fact, I couldn't resist to start implementing the deleted-refs/$frotz~ref
> stuff we talked about...
How would that help? We need to audit the existing scripts
since they would not look under $GIT_DIR/deleted-refs currently
anyway.
^ permalink raw reply [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).