Thread (1 message) 1 message, 1 author, 2016-06-23

Re: [PATCH v2 7/7] color: support strike-through attribute

From: Junio C Hamano <hidden>
Date: 2016-06-23 19:56:15

Jeff King [off-list ref] writes:
... but with --color-words, it actually helps quite a
bit (try it on the documentation patch from this series, for example).
This gets me back to another tangent, but this time a one that is
quite a lot more relevant to Git.

There is this change in "git show --word-diff" for the "italic"
patch:

    The accepted attributes are `bold`, `dim`, `ul`, `blink`,
    {+`reverse`,+} and [-`reverse`.-]{+`italic`.+}

If we imagine that the pre- and post- image expressed in "one token
per line" format, the text before and after the patch would have
read like this:

    preimage		postimage
    -----------         ------------
    ...			...
    blink		blink
    ,			,
    and			reverse
    reverse		,
    .			and
    			reverse
                        .

And the current output is showing an equivalent of this diff:

	...
        blink
        ,
       +reverse
       +,
        and
       -reverse
       -.
       +italic
       +.

But if we were doing line-level diff for the above two, I would
think this is much easier to read:

	...
        blink
        ,
       -and
        reverse
       +,
       +and
       +italic
       +.

That would give us a word-diff more like this, I would imagine,

    The accepted attributes are `bold`, `dim`, `ul`, `blink`,
    [-and-] reverse[-,-] {+and `italic`}.

and that would be much easier to read than the current --word-diff
output.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help