Re: [WIP RFC 4/5] upload-pack: refactor writing of "packfile" line

2018-12-06 Thread Junio C Hamano
Jonathan Tan writes: >> Jonathan Tan writes: >> >> > @@ -126,6 +129,12 @@ static int read_pack_objects_stdout(int outfd, struct >> > output_state *os) >> >} >> >os->used += readsz; >> > >> > + if (!os->packfile_started) { >> > + os->packfile_started = 1; >> > + if

Re: [WIP RFC 4/5] upload-pack: refactor writing of "packfile" line

2018-12-06 Thread Jonathan Tan
> Jonathan Tan writes: > > > @@ -126,6 +129,12 @@ static int read_pack_objects_stdout(int outfd, struct > > output_state *os) > > } > > os->used += readsz; > > > > + if (!os->packfile_started) { > > + os->packfile_started = 1; > > + if (use_protocol_v2) > > +

Re: [WIP RFC 4/5] upload-pack: refactor writing of "packfile" line

2018-12-05 Thread Junio C Hamano
Jonathan Tan writes: > @@ -126,6 +129,12 @@ static int read_pack_objects_stdout(int outfd, struct > output_state *os) > } > os->used += readsz; > > + if (!os->packfile_started) { > + os->packfile_started = 1; > + if (use_protocol_v2) > +

[WIP RFC 4/5] upload-pack: refactor writing of "packfile" line

2018-12-03 Thread Jonathan Tan
A subsequent patch allows pack-objects to output additional information (in addition to the packfile that it currently outputs). This means that we must hold off on writing the "packfile" section header to the client before we process the output of pack-objects, so move the writing of the