author | Junio C Hamano <gitster@pobox.com> | |
Fri, 11 Mar 2011 19:32:53 +0000 (11:32 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 17 Mar 2011 23:18:47 +0000 (16:18 -0700) | ||
commit | 36cfda15527d4eb50c84256307e3cb46578f975e | |
tree | 636ad34656122b3c22046010b315d3581bca84f8 | tree | snapshot |
parent | ea2c69ed4728070be1d2ee953a6948398b859150 | commit | diff |
refs_from_alternate: helper to use refs from alternates
The receiving end of "git push" advertises the objects that the repository
itself does not use, but are at the tips of refs in other repositories
whose object databases are used as alternates for it. This helps it avoid
having to receive (and the pusher having to send) objects that are already
available to the receiving repository via the alternates mechanism.
Tweak the helper function that implements this feature, and move it to
transport.[ch] for future reuse by other programs.
The additional test demonstrates how this optimization is helping "git push",
and "git fetch" is ignorant about it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
The receiving end of "git push" advertises the objects that the repository
itself does not use, but are at the tips of refs in other repositories
whose object databases are used as alternates for it. This helps it avoid
having to receive (and the pusher having to send) objects that are already
available to the receiving repository via the alternates mechanism.
Tweak the helper function that implements this feature, and move it to
transport.[ch] for future reuse by other programs.
The additional test demonstrates how this optimization is helping "git push",
and "git fetch" is ignorant about it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
builtin/receive-pack.c | diff | blob | history | |
t/t5501-fetch-push-alternates.sh | [new file with mode: 0755] | blob |
transport.c | diff | blob | history | |
transport.h | diff | blob | history |