Re: [PATCH v2 1/7] log-tree: respect diffopt's configured output file stream
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jun 21, 2016, 10:39 UTC
- Message-ID
- <alpine.DEB.2.20.1606211236040.22630@virtualbox>
- In-Reply-To
- <alpine.DEB.2.20.1606210937440.22630@virtualbox>
Hi,
On Tue, 21 Jun 2016, Johannes Schindelin wrote:
Show 6 quoted lines
> 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