]> granicus.if.org Git - git/commitdiff
Merge branch 'nd/fetch-into-shallow'
authorJunio C Hamano <gitster@pobox.com>
Fri, 20 Sep 2013 19:25:32 +0000 (12:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Sep 2013 19:25:32 +0000 (12:25 -0700)
When there is no sufficient overlap between old and new history
during a fetch into a shallow repository, we unnecessarily sent
objects the sending side knows the receiving end has.

* 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

1  2 
builtin/pack-objects.c
commit.h
fetch-pack.c
http-push.c
list-objects.c
t/t5500-fetch-pack.sh
upload-pack.c

Simple merge
diff --cc commit.h
Simple merge
diff --cc fetch-pack.c
index 094267fd80cdb09feec75c89aa2f4931f11e583d,28195ed78b281204850de9c5bfeee03fa29efd79..13b5b43bfa9092476d8715c005e06086b7343a54
@@@ -897,9 -845,7 +846,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.");
  
diff --cc http-push.c
Simple merge
diff --cc list-objects.c
Simple merge
Simple merge
diff --cc upload-pack.c
Simple merge