author | Nicolas Pitre <nico@cam.org> | |
Thu, 3 Sep 2009 23:08:33 +0000 (19:08 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 6 Sep 2009 05:25:26 +0000 (22:25 -0700) | ||
commit | 6523078b96cd39f681e6fa11135049808591fb95 | |
tree | 5bd0eb04eedd873db87c2fe67eecbdf7eb461200 | tree | snapshot |
parent | 86386829d425a3d3ae6ce713c58328607e50e523 | commit | diff |
make shallow repository deepening more network efficient
First of all, I can't find any reason why thin pack generation is
explicitly disabled when dealing with a shallow repository. The
possible delta base objects are collected from the edge commits which
are always obtained through history walking with the same shallow refs
as the client, Therefore the client is always going to have those base
objects available. So let's remove that restriction.
Then we can make shallow repository deepening much more efficient by
using the remote's unshallowed commits as edge commits to get preferred
base objects for thin pack generation. On git.git, this makes the data
transfer for the deepening of a shallow repository from depth 1 to depth 2
around 134 KB instead of 3.68 MB.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
First of all, I can't find any reason why thin pack generation is
explicitly disabled when dealing with a shallow repository. The
possible delta base objects are collected from the edge commits which
are always obtained through history walking with the same shallow refs
as the client, Therefore the client is always going to have those base
objects available. So let's remove that restriction.
Then we can make shallow repository deepening much more efficient by
using the remote's unshallowed commits as edge commits to get preferred
base objects for thin pack generation. On git.git, this makes the data
transfer for the deepening of a shallow repository from depth 1 to depth 2
around 134 KB instead of 3.68 MB.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload-pack.c | diff | blob | history |