Re: [WIP RFC 3/5] upload-pack: refactor reading of pack-objects out
- From
Stefan Beller <sbeller@google.com>
- Date
- Dec 4, 2018, 00:30 UTC
- Message-ID
- <CAGZ79kZ3W3n7Y80ZLP5-eC2WSBBmC-ztx2z1zgzegvKXfD3r2g@mail.gmail.com>
- In-Reply-To
- <e19f294df9ff999d30a47339a7848c7104bfae7d.1543879256.git.jonathantanmy@google.com>
On Mon, Dec 3, 2018 at 3:37 PM Jonathan Tan <jonathantanmy@google.com> wrote:
Show 7 quoted lines
> > 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 variable with a buffer array.
This buffering sounds oddly similar to the pkt reader which can buffer at most one pkt, the difference being that we'd buffer bytes instead of pkts.