Re: [PATCH v2 1/2] Add diff --porcelain option for --color-words

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

 



Thomas Rast <trast@xxxxxxxxxxxxxxx> writes:

> This teaches the --color-words mode a new option --porcelain that
> disables color mode again and instead uses an ad-hoc format for the
> word diff designed for machine reading.

How readable can you make this for human consumption while still keeping
it machine readable?  The answer could be it already is human readble.

Two reasons I ask the above question are that I find the feature quite
interesting, and would want to see if it can be also fed to humans, and
that the combination of this new option and the existing --color-words is
misnamed.

What you are giving "git diff" is "word-level diff" as opposed to the
usual "line-level diff", isn't it?  The machinery may have already been
there, but it had a hardwired representation of the result to color pre-
and post- image words, and you are giving the result from the machinery
another representation with this patch.  If you call this --word-diff,
then it would become more clear that --color-words perhaps should have
been called --word-diff=color or something.

Besides, --porcelain invites "what does it do without --color-words?", to
which you wouldn't have a good answer, as non word-diff output is already
machine readable.
--
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]