Re: [PATCH v2 1/6] object-file: refactor write_loose_object() to support inputstream
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 18, 2021, 06:45 UTC
- Message-ID
- <xmqq7dd6ynb9.fsf@gitster.g>
- In-Reply-To
- <CANYiYbHiTnhpzyWLakVZ6tfmG0pKO=qHdZsgaocX6eJ=PN_06g@mail.gmail.com>
Jiang Xin <worldhello.net@gmail.com> writes:
Show 26 quoted lines
> On Fri, Nov 12, 2021 at 5:43 PM Han Xin <chiyutianyi@gmail.com> wrote: >> >> From: Han Xin <hanxin.hx@alibaba-inc.com> > > It would be better to provide a cover letter describing changes in v2, such as: > > * Make "write_loose_object()" a public method, so we can > reuse it in "unpack_non_delta_entry()". > (But I doubt we can use "write_object_file_flags()" public > function, without make this change.) > > * Add an new interface "input_stream" as an argument for > "write_loose_object()", so that we can feed data to > "write_loose_object()" from buffer or from zlib stream. > >> Refactor write_loose_object() to support inputstream, in the same way >> that zlib reading is chunked. > > In the beginning of your commit log, you should describe the problem, such as: > > We used to read the full content of a blob into buffer in > "unpack_non_delta_entry()" by calling: > > void *buf = get_data(size); > > This will consume lots of memory for a very big blob object.
I was not sure where "in_stream" came from---"use X insteads of Y", when X is what these patches invent and introduce, does not make a good explanation without explaining what X is, what problem X is attempting to solve and how.
Thanks for helping to clarify the proposed log message.