From: Jeff King Date: Tue, 20 Mar 2018 15:58:14 GMT Subject: Re: [BUG] log --graph corrupts patch Message-ID: <20180320155814.GA32366@sigill.intra.peff.net> In-Reply-To: <1e686ea0-90ac-f3f4-7bcf-6951c9253598@talktalk.net> On Tue, Mar 20, 2018 at 09:58:14AM +0000, Phillip Wood wrote: > > Are you using any exotic filters for your pager? If you use "git > > --no-pager" does the problem persist? > > Hi Peff, thanks for taking the time to check this, I had forgotten about > the pager. I'm using diff-highlight and it seems that is causing the > problems. Heh. Lucky guess. Unsurprisingly, I use diff-highlight, too. But I did not see it because I never bothered to upgrade my personal copy of the script, which has been working for me for ages, to the one in contrib/. But indeed, I can easily reproduce the problem with that version of the script. Here's a pretty minimal reproduction: -- >8 -- cat >bad <<\EOF * commit whatever | other stuff irrelevant | | diff --git a/foo b/foo | --- a/foo | --- b/foo | @@ -100,6 +100,9 | some | context | lines | +some | +new | +lines | -context line with a leading minus | and other | context EOF contrib/diff-highlight/diff-highlight