Re: [PATCH v2 7/7] color: support strike-through attribute
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 23, 2016, 19:56 UTC
- Message-ID
- <xmqq7fdfisrr.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20160623183907.GA32368@sigill.intra.peff.net>
Jeff King <peff@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.