Re: [PATCH 6/8] gitweb: Highlight interesting parts of diff
- From
Michal Kiedrowicz <michal.kiedrowicz@gmail.com>
- Date
- Feb 14, 2012, 06:54 UTC
- Message-ID
- <20120214075439.14f1d2b7@mkiedrowicz.ivo.pl>
- In-Reply-To
- <m339aivn4z.fsf@localhost.localdomain>
Jakub Narebski <jnareb@gmail.com> wrote:
Show 13 quoted lines
> Michał Kiedrowicz <michal.kiedrowicz@gmail.com> writes: > > > 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. > > I was thinking that if gitweb were to support "diff refinement > highlighting", it would either use one of *Diff* packages from CPAN, > or "git diff --word-diff" output. >
I just started to wonder if we couldn't use output from Jeff's diff-highlight for gitweb. We could tech diff-highlight to produce diffs marked with -{} and +{} (this is the notation used by Jeff in one of his recent patches) or something like this and then just convert that into HTML markup. Changes in gitweb would be minimal, we would reduce redundancy and could focus on improving matching algorithm in one place.