From: Junio C Hamano Date: Wed, 23 Oct 2013 20:32:17 +0000 (-0700) Subject: Merge branch 'nd/fetch-into-shallow' into maint X-Git-Tag: v1.8.4.2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6ba0d9551a2963a6fed83b90b55a373d79ef46d0;p=thirdparty%2Fgit.git Merge branch 'nd/fetch-into-shallow' into maint When there is no sufficient overlap between old and new history during a "git fetch" into a shallow repository, objects that the sending side knows the receiving end has were unnecessarily sent. * nd/fetch-into-shallow: Add testcase for needless objects during a shallow fetch list-objects: mark more commits as edges in mark_edges_uninteresting list-objects: reduce one argument in mark_edges_uninteresting upload-pack: delegate rev walking in shallow fetch to pack-objects shallow: add setup_temporary_shallow() shallow: only add shallow graft points to new shallow file move setup_alternate_shallow and write_shallow_commits to shallow.c --- 6ba0d9551a2963a6fed83b90b55a373d79ef46d0 diff --cc fetch-pack.c index f5d99c1181,28195ed78b..aff4f5abab --- a/fetch-pack.c +++ b/fetch-pack.c @@@ -896,9 -845,7 +845,9 @@@ static struct ref *do_fetch_pack(struc if (args->stateless_rpc) packet_flush(fd[1]); if (args->depth > 0) - setup_alternate_shallow(); + setup_alternate_shallow(&shallow_lock, &alternate_shallow_file); + else + alternate_shallow_file = NULL; if (get_pack(args, fd, pack_lockfile)) die("git fetch-pack: fetch failed.");