Re: [PATCH v4 20/25] sequencer: refactor write_message()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 21, 2016, 11:43 UTC
- Message-ID
- <alpine.DEB.2.20.1610211343310.3264@virtualbox>
- In-Reply-To
- <xmqqd1iug42f.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Thu, 20 Oct 2016, Junio C Hamano wrote:
Show 22 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > > > If I were doing this, I would make this into three separate steps: > > > > - move the strbuf_release(msgbuf) to the caller in > > do_pick_commit(); > > > > - add the missing rollback_lock_file(), which is a bugfix; and > > then finally > > > > - allow the helper to take not a strbuf but <buf, len> pair as > > parameters. > > > > The end result of this patch achieves two thirds of the above, but > > especially given that write_message() only has two call sites in a > > single function, I think it is OK and preferrable even to do all > > three. > > Ah, make that four steps. The final one is: > > - add append_eol parameter that nobody uses at this step in the > series.
Done, Dscho