Re: [PATCH 0/2] Re: [PATCH v3 14/20] diff: add an internal option to dual-color diffs of diffs

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

 



Hi Stefan,

On Tue, 10 Jul 2018, Stefan Beller wrote:

> This is developed on top of 4a68b95ce2a6 (your series here)
> 
> This is an attempt to explain the previous email better,
> specially the second (yet unfinished) patch, but the resulting
> emit_line_0 is way clearer in my mind, dropping the 'first' character
> and instead having a 'char *sign' that (a) we can color differently for
> dual color and (b) can have multiple chars, the refactoring for the multiple
> chars would need to happen at a slightly higher level.
> 
> Feel free to draw inspiration from here, but if not that is fine, too
> (as I did not fully understand the word diffing problem yet, this may add a
> burden instead of just taking these patches).
> I can send up a cleanup series after yours lands, as well.

We discussed this on IRC a couple of days ago, and I think that this patch
pair was designed under the assumption that the dual color mode would use
diff markers of the same color, always. However, the dual color mode is
about *inverting* the color of the first marker (and using the marker
itself to determine the color) and then using a potentially *different*
color on the second marker (using *that* marker to determine the color).
Example:

	<background red>-</background><foreground green>+ Hello</foreground>

So I allowed myself to focus on trying to wrap my head around the way the
whitespace flags work, and how to adjust the code in cache.h/diff.c/diff.h
to replace the relatively simple workaround by a full blown correct patch
(which is sadly a *lot* larger).

Ciao,
Dscho



[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]

  Powered by Linux