Re: [WIP RFC 3/5] upload-pack: refactor reading of pack-objects out

2018-12-04 Thread Junio C Hamano
Jonathan Tan writes: > +struct output_state { > + char buffer[8193]; > + int used; > +}; > + > +static int read_pack_objects_stdout(int outfd, struct output_state *os) > +{ The naming feels quite odd. We are downstream of pack-objects and reading its standard output stream, so "read

Re: [WIP RFC 3/5] upload-pack: refactor reading of pack-objects out

2018-12-03 Thread Stefan Beller
On Mon, Dec 3, 2018 at 3:37 PM Jonathan Tan wrote: > > Subsequent patches will change how the output of pack-objects is > processed, so extract that processing into its own function. > > Currently, at most 1 character can be buffered (in the "buffered" local > variable). One of those patches will

[WIP RFC 3/5] upload-pack: refactor reading of pack-objects out

2018-12-03 Thread Jonathan Tan
Subsequent patches will change how the output of pack-objects is processed, so extract that processing into its own function. Currently, at most 1 character can be buffered (in the "buffered" local variable). One of those patches will require a larger buffer, so replace that "buffered" local