git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] fetch-pack: Do not fetch tags for shallow clones.
@ 2006-11-24 15:00 Alexandre Julliard
  2006-11-24 20:28 ` Junio C Hamano
  2006-11-25 19:01 ` Johannes Schindelin
  0 siblings, 2 replies; 3+ messages in thread
From: Alexandre Julliard @ 2006-11-24 15:00 UTC (permalink / raw)
  To: git

A better fix may be to only fetch tags that point to commits that we
are downloading, but git-clone doesn't have support for following
tags. This will happen automatically on the next git-fetch though.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
 fetch-pack.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fetch-pack.c b/fetch-pack.c
index bb310b6..80979b8 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -342,7 +342,8 @@ static void filter_refs(struct ref **ref
 		if (!memcmp(ref->name, "refs/", 5) &&
 		    check_ref_format(ref->name + 5))
 			; /* trash */
-		else if (fetch_all) {
+		else if (fetch_all &&
+			 (!depth || strncmp(ref->name, "refs/tags/", 10) )) {
 			*newtail = ref;
 			ref->next = NULL;
 			newtail = &ref->next;
-- 
1.4.4.1.ga335e

-- 
Alexandre Julliard

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

end of thread, other threads:[~2006-11-25 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-24 15:00 [PATCH 5/5] fetch-pack: Do not fetch tags for shallow clones Alexandre Julliard
2006-11-24 20:28 ` Junio C Hamano
2006-11-25 19:01 ` Johannes Schindelin

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).