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

Reply via email to