From: Miles Bader <miles@gnu.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Thomas Rast <trast@student.ethz.ch>, <git@vger.kernel.org>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Eelis van der Weegen <eelis@eelis.net>
Subject: Re: [PATCH v2 1/2] Add diff --porcelain option for --color-words
Date: Sun, 04 Apr 2010 07:38:50 +0900 [thread overview]
Message-ID: <87wrwoma9x.fsf@catnip.gol.com> (raw)
In-Reply-To: <7vmxxk8i01.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Sat, 03 Apr 2010 12:15:42 -0700")
Junio C Hamano <gitster@pobox.com> 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.
next prev parent reply other threads:[~2010-04-03 22:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-31 0:52 [RFC PATCH 0/2] gitk --color-words Thomas Rast
2010-03-31 0:52 ` [PATCH 1/2] Add diff --porcelain option for --color-words Thomas Rast
2010-03-31 0:52 ` [PATCH 2/2] gitk: add the equivalent of diff --color-words Thomas Rast
2010-03-31 12:04 ` Thomas Rast
2010-04-03 18:06 ` [PATCH v2 0/2] gitk --color-words Thomas Rast
2010-04-03 18:06 ` [PATCH v2 1/2] Add diff --porcelain option for --color-words Thomas Rast
2010-04-03 19:15 ` Junio C Hamano
2010-04-03 22:38 ` Miles Bader [this message]
2010-04-03 18:06 ` [PATCH v2 2/2] gitk: add the equivalent of diff --color-words Thomas Rast
2010-04-05 6:40 ` [PATCH v2 0/2] gitk --color-words Paul Mackerras
2010-04-05 10:21 ` Thomas Rast
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wrwoma9x.fsf@catnip.gol.com \
--to=miles@gnu.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=eelis@eelis.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=trast@student.ethz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).