aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Julliard <julliard@winehq.org>2006-11-24 16:00:13 +0100
committerJunio C Hamano <junkio@cox.net>2006-11-24 15:42:50 -0800
commit4bcb310c2539b66d535e87508d1b7a90fe29c083 (patch)
treede299a8d9a684c095d8ceaa2f02a51c47dd09a63
parentd64d6c9fc712cf6fad9a3ec7f659cf843ee2e18d (diff)
downloadgit-4bcb310c2539b66d535e87508d1b7a90fe29c083.tar.gz
git-4bcb310c2539b66d535e87508d1b7a90fe29c083.tar.xz
fetch-pack: Do not fetch tags for shallow clones.
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> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--fetch-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index bb310b644..80979b83b 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -342,7 +342,8 @@ static void filter_refs(struct ref **refs, int nr_match, char **match)
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;