git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Miles Bader <miles@gnu.org>
Date
Apr 3, 2010, 22:38 UTC
Message-ID
<87wrwoma9x.fsf@catnip.gol.com>
In-Reply-To
<7vmxxk8i01.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
> 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.
Previous: Junio C HamanoNext: Thomas Rast
Message 8 of 11 in “gitk --color-words”
  1. 0/2 gitk --color-wordsThomas Rast, Mar 31, 2010
  2. 1/2 Add diff --porcelain option for --color-wordsThomas Rast, Mar 31, 2010
  3. 2/2 gitk: add the equivalent of diff --color-wordsThomas Rast, Mar 31, 2010
  4. Thomas RastMar 31, 2010
  5. 0/2 gitk --color-wordsThomas Rast, Apr 3, 2010
  6. 1/2 Add diff --porcelain option for --color-wordsThomas Rast, Apr 3, 2010
  7. Junio C HamanoApr 3, 2010
  8. Miles BaderApr 3, 2010
  9. 2/2 gitk: add the equivalent of diff --color-wordsThomas Rast, Apr 3, 2010
  10. Paul MackerrasApr 5, 2010
  11. Thomas RastApr 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.