On Tue, 2 Jan 2018 16:18:15 -0800 Brandon Williams <bmwill@xxxxxxxxxx> wrote: > diff --git a/connect.c b/connect.c > index caa539b75..9badd403f 100644 > --- a/connect.c > +++ b/connect.c > @@ -12,9 +12,11 @@ > #include "sha1-array.h" > #include "transport.h" > #include "strbuf.h" > +#include "version.h" > #include "protocol.h" > > static char *server_capabilities; > +static struct argv_array server_capabilities_v2 = ARGV_ARRAY_INIT; > static const char *parse_feature_value(const char *, const char *, int *); > > static int check_ref(const char *name, unsigned int flags) > @@ -62,6 +64,33 @@ static void die_initial_contact(int unexpected) > "and the repository exists.")); > } > > +static int server_supports_v2(const char *c, int die_on_error) Document what "c" means. [snip] > +static void process_capabilities_v2(struct packet_reader *reader) > +{ > + while (packet_reader_read(reader) == PACKET_READ_NORMAL) { > + argv_array_push(&server_capabilities_v2, reader->line); > + } No need for braces on single-line blocks. > +static int process_ref_v2(const char *line, struct ref ***list) The "list" is the tail of a linked list, so maybe name it "tail" instead.