Jiang Xin <worldhello.net@xxxxxxxxx> writes: > On Fri, Nov 12, 2021 at 5:43 PM Han Xin <chiyutianyi@xxxxxxxxx> wrote: >> >> From: Han Xin <hanxin.hx@xxxxxxxxxxxxxxx> > > 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.