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

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

From: Miles Bader <hidden>
Date: 2016-06-15 22:48:33

Junio C Hamano [off-list ref] writes:
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.
There's the format used by the "wdiff" program, which is more like
traditional diff output in that it doesn't use color, but is human
friendly, and also seems to be somewhat machine-parseable:

   $ echo 'This is a test' > /tmp/a
   $ echo 'This is funky test' > /tmp/b
   $ wdiff /tmp/a /tmp/b
   This is [-a-] {+funky+} test

[I say "somewhat" because wdiff itself doesn't appear to escape potentially
ambiguous content, e.g., if there's actually a "{+" in the file....]

-Miles

-- 
Marriage, n. The state or condition of a community consisting of a master, a
mistress and two slaves, making in all, two.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help