Re: [PATCH v2 03/14] sequencer: lib'ify write_message()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 30, 2016, 07:49 UTC
- Message-ID
- <alpine.DEB.2.20.1608300947540.129229@virtualbox>
- In-Reply-To
- <xmqqfupn9v76.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Mon, 29 Aug 2016, Junio C Hamano wrote:
Show 20 quoted lines
> Johannes Schindelin <johannes.schindelin@gmx.de> writes: > > > Instead of dying there, let the caller high up in the callchain > > notice the error and handle it (by dying, still). > > > > The only caller of write_message(), do_pick_commit() already checks > > the return value and passes it on to its callers, so its caller must > > be already prepared to handle error returns, and with this step, we > > make it notice an error return from this function. > > ... > > @@ -223,7 +226,7 @@ static int fast_forward_to(const unsigned char *to, const unsigned char *from, > > > > read_cache(); > > if (checkout_fast_forward(from, to, 1)) > > - exit(128); /* the callee should have complained already */ > > + return -1; /* the callee should have complained already */ > > This hunk does not seem to have anything to do with write_message() > conversion, other than that its only caller, do_pick_commit(), also > calls write_message().
Darn. Sorry that this slipped through. I split it out into its own commit, and fixed checkout_fast_forward_to() in yet another commit.
Ciao, Dscho