summaryrefslogtreecommitdiff
path: root/connect.h
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-03-14 11:31:44 -0700
committerJunio C Hamano <gitster@pobox.com>2018-03-14 14:15:06 -0700
commit7e3e479b90fd618fb8eb8222738f7cc53ab288fa (patch)
tree1b98c55de85860844ef10a2c08223960aad9e564 /connect.h
parent635365eb2f67bc17482c5dbe076f20832cf92ae2 (diff)
downloadgit-7e3e479b90fd618fb8eb8222738f7cc53ab288fa.tar.gz
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 'connect.h')
0 files changed, 0 insertions, 0 deletions