Re: [PATCH 6/8] gitweb: Highlight interesting parts of diff

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 6/8] gitweb: Highlight interesting parts of diff

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:04

Michal Kiedrowicz [off-list ref] writes:
I just started to wonder if we couldn't use output from Jeff's
diff-highlight for gitweb.
That could be a sensible approach, but
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.
this implementation strategy would not work well, given that the payload
can contain arbitrary letter sequence (e.g. a Perl script that wants be
explicit when writing a hashref literal write +{...}  to disambiguate it
from a block).  If you are going to modularize diff-highlight and reuse
it, it needs to learn how to talk HTML to properly escape the payload.

Re: [PATCH 6/8] gitweb: Highlight interesting parts of diff

From: Jeff King <hidden>
Date: 2016-06-15 22:53:04

On Mon, Feb 13, 2012 at 11:14:22PM -0800, Junio C Hamano wrote:
quoted
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.
this implementation strategy would not work well, given that the payload
can contain arbitrary letter sequence (e.g. a Perl script that wants be
explicit when writing a hashref literal write +{...}  to disambiguate it
from a block).  If you are going to modularize diff-highlight and reuse
it, it needs to learn how to talk HTML to properly escape the payload.
They're both written in perl; perhaps a more sensible solution would be
to lib-ify diff-highlight and use it directly inside gitweb.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help