On 04/17, Johannes Schindelin wrote: > Hi Thomas, > > On Mon, 15 Apr 2019, Thomas Gummerer wrote: > > I like declaring this a bug. We are after all parsing > > machine-generated output, that does come from git (which is why I > > neglected the NULL checking in the first place). If that second "@@" > > is not there it's definitely a bug somewhere in the diff machinery, > > I'd say. > > Ah, but you do know about the micro-project I proposed to optionally feed > an mbox to `range-diff`, right? > > The idea behind my proposal is that this would make it possible to > generate a range-diff between the patches on public-inbox and the commits > that actually made it into Junio's `pu`... I had forgotten about that, and was only looking at what the code currently does. > > Note that the "@@" also couldn't come from anywhere else, the diff > > header has a well defined format and so does the metadata. The diff > > itself is prefixed with '<', '>' and '#' in this case, and the commit > > message is also prefixed with four spaces. So if this breaks > > somewhere I'd rather hear about it loudly, than let users potentially > > get wrong output because we missed something somewhere. > > Agreed. But I could imagine that `die()`ing here would be the more > appropriate way to holler loudly ;-) Yup, in the light of the potential microproject, I'm fine with just 'die()'ing here. If we'd get into this situation right now, there would probably be a bunch of other tests failing as well, so we might as well make it a little more future proof. Thanks.