Subject: Re: [PATCH v2 1/7] log-tree: respect diffopt's configured output file stream

From: Johannes Schindelin <[email-masked]>
Date: Tue, 21 Jun 2016 12:39:37 +0200 (CEST)

Hi,

On Tue, 21 Jun 2016, Johannes Schindelin wrote:

> On Tue, 21 Jun 2016, Johannes Schindelin wrote:
> 
> > Expect v3 in a moment.
> 
> I am sorry. The regression test suite just sounded red alert. So: do not
> expect v3 in a moment, but later today.

So making maybe_flush_or_die() uncovered a problem with the builtin am: it
called log_tree_commit() after setting diffopt.file *and*
diffopt.close_file. The latter forced diff_flush() to close the file, and
log_tree_commit() happily tried to flush() the same file stream. In my
setup, this triggered a segmentation fault which was really hard to debug
because it happened in a Git subprocess that expected input from stdin
(and therefore my go-to debugging method to fire up gdb was a bit
useless).

In the end, it not only added two new patches to the patch series, but
also opened a big rabbit hole: builtin/am.c could use quite some error
checking, I guess... Now I wish I hadn't seen it...

Well, I just sent v3 of the series.

Ciao,
Dscho