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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]