Re: [PATCH 3/9] Prepare the builtins for a libified merge_recursive()
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 2, 2016, 07:24 UTC
- Message-ID
- <alpine.DEB.2.20.1607020921200.12947@virtualbox>
- In-Reply-To
- <xmqq37nt1i0k.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Fri, 1 Jul 2016, Junio C Hamano wrote:
Show 13 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > >> > A truly libified function does not die() just for fun. > >> > >> The sentence is wasting bits. After all, a helper function in > >> run-once-and-exit program does not die() just for fun, either. > > > > This sentence does not so much target *you* personally as audience, but > > the occasional reader of the log who wonders: "Why don't we just call > > die()? We would not have to worry about passing back the return value > > through all those long call chains..." > > I was (and I am still) reacting mostly to "just for fun".
Yeah, sorry, that part was lost on me.
Show 18 quoted lines
> > Even more natural is it to guess that the code will call error(), just > > like we do almost everywhere else. > > ... > >> But that does not mesh very well with the stated objective of the > >> patch. > > ... > > I could imagine that you wanted even more fine-grained control, where we > > have a range of return values indicating different error conditions. > > I personally don't. I was pointing out the discrepancy between what > the introduction says, i.e. "this way is way more flexible for the > callers when they want to do their own error handling", and what the > code actually does. If the explanation said "This series does not > give the full flexibility potential callers may desire yet, but at > least gives enough flexibility to do 'I do not want the called > function to die, but append my own error message before I die > myself'.", that is certainly an understandable stance to take, I > would say.
Ah, but the message did not say "error message handling", but "error handling". With my limited command of the English language, I tried to convey that this patch allows the callers to do something when the called operation reported an error. Previously they did not get the chance.
Ciao, Dscho