From: Michał Kiedrowicz Date: Fri, 10 Feb 2012 21:29:16 GMT Subject: Re: [PATCH 6/8] gitweb: Highlight interesting parts of diff Message-ID: <20120210222916.2721e9e6@gmail.com> In-Reply-To: <20120210202008.GA5874@sigill.intra.peff.net> Jeff King wrote: > On Fri, Feb 10, 2012 at 10:18:12AM +0100, Michał Kiedrowicz wrote: > > > The code that comares lines is based on > > contrib/diff-highlight/diff-highlight, except that it works with > > multiline changes too. It also won't highlight lines that are > > completely different because that would only make the output unreadable. > > Combined diffs are not supported but a following commit will change it. > > Have you considered contributing back the enhancements to > contrib/diff-highlight? Yeah, I did. In fact, at work I have a hacked version of your diff-highlight that supports multiline changes and I use it every day. But I just couldn't make myself fix your long README and send a patch :). Maybe I'll cook something in my spare time. > I took a look at handling multi-line changes > when I originally wrote it, but I was worried too much about failing to > match up lines properly, and ending up with too much noise in the diff. > Maybe your "don't highlight lines that are completely different" rule > helps that, though. I must say that it works great for me. Most often it's very helping. Like every heuristics it sometimes goes the wrong way, but it's so rare that I don't find it disturbing. > > Do you have any examples handy? (I was hoping not to need to get a > running gitweb installation in order to see the output). > > -Peff Nope. Except for comparing diffs in various commits in gitweb-1.7.9 and from my branch, I just created a dummy commit with different kinds of changes to check if they are properly colorized.