diff options
author | Brandon Williams <bmwill@google.com> | 2018-03-14 21:31:44 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-15 00:15:06 +0300 |
commit | 7e3e479b90fd618fb8eb8222738f7cc53ab288fa (patch) | |
tree | 1b98c55de85860844ef10a2c08223960aad9e564 /builtin/fetch-pack.c | |
parent | 635365eb2f67bc17482c5dbe076f20832cf92ae2 (diff) |
connect: convert get_remote_heads to use struct packet_reader
In order to allow for better control flow when protocol_v2 is introduced
convert 'get_remote_heads()' to use 'struct packet_reader' to read
packet lines. This enables a client to be able to peek the first line
of a server's response (without consuming it) in order to determine the
protocol version its speaking and then passing control to the
appropriate handler.
This is needed because the initial response from a server speaking
protocol_v0 includes the first ref, while subsequent protocol versions
respond with a version line. We want to be able to read this first line
without consuming the first ref sent in the protocol_v0 case so that the
protocol version the server is speaking can be determined outside of
'get_remote_heads()' in a future patch.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fetch-pack.c')
0 files changed, 0 insertions, 0 deletions