Re: [PATCH] Check that a tag exists using show-ref instead of looking for the ref file.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Tuesday, October 3, 2006 - 2:09 am

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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Check that a tag exists using show-ref instead ..., Junio C Hamano, (Tue Oct 3, 2:09 am)