1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-21 16:59:07 +02:00

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>
This commit is contained in:
Alexandre Julliard 2006-11-24 16:00:13 +01:00 committed by Junio C Hamano
parent d64d6c9fc7
commit 4bcb310c25

View File

@ -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;