]> git.ipfire.org Git - thirdparty/git.git/commit - transport.c
transport: do not list refs if possible
authorJonathan Tan <jonathantanmy@google.com>
Thu, 27 Sep 2018 19:24:05 +0000 (12:24 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 7 Oct 2018 00:53:15 +0000 (09:53 +0900)
commit01775651481ecd9c7288a85cfb7999f7f38ab37c
tree3e2dfaec7103a81426e4d8dd3a7e16ddd6fa0587
parent99bcb883cb2bd2d27939a831a66d794770427e98
transport: do not list refs if possible

When all refs to be fetched are exact OIDs, it is possible to perform a
fetch without requiring the remote to list refs if protocol v2 is used.
Teach Git to do this.

This currently has an effect only for lazy fetches done from partial
clones. The change necessary to likewise optimize "git fetch <remote>
<sha-1>" will be done in a subsequent patch.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fetch-pack.c
t/t5702-protocol-v2.sh
transport.c