Thread (61 messages) flat view 61 messages, 3 authors, 2016-06-15

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

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

On Tue, Feb 14, 2012 at 09:04:53PM +0100, Michał Kiedrowicz wrote:
Sure, now it's a simple algorithm, but if we add more code, we will
have problems with making it consistent in both gitweb and
diff-highlight (which is nice-to-have IMO).
True. I was thinking they would stay simple enough that porting features
wouldn't be too painful. But that might be overly optimistic.
Note that my patches to gitweb already support combined diffs (in
obvious cases) while diff-highlight will fail on them badly (see for
example 09bb4eb4f14c).  I haven't done it in diff-highlight because I
noticed that problem while working on patches for gitweb.
Hmm. 09bb4eb4f14c looks fine to me, because all of the combined lines
are from the left-hand side. A better example is 4802997, where the
first hunk properly highlights, but the second does not (because we
interpret the lines as context lines).

Even worse is "git show 5de89d3 -- notes-cache.c", where we match a "- "
line with a "++" line, and erroneously think the changes begin in the
second character (even though it is simply a combined-diff marker).

These are reasonably rare, so I don't consider them critical bugs, but
yeah, it would be nice to fix.

-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