From: Thomas Rast <trast@student.ethz.ch>
To: <git@vger.kernel.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Eelis van der Weegen <eelis@eelis.net>,
Paul Mackerras <paulus@samba.org>
Subject: [RFC PATCH 0/2] gitk --color-words
Date: Wed, 31 Mar 2010 02:52:47 +0200 [thread overview]
Message-ID: <cover.1269996525.git.trast@student.ethz.ch> (raw)
This little pair of patches teaches gitk a color-words diff view.
To get there, I finally got rid of the assumption that --color-words
only ever needs to output ANSI(?) color sequences. Hopefully this
will help other people to use --color-words in nice frontends.
It uses an ad-hoc output format where newlines in the output are
insignificant (so as to be able to speak about added/removed words)
and newlines from the input are output as a line with only a '~'.
RFC among other things because
* I chose ~ more or less randomly. Do any diff implementations out
there use it for some other purpose?
* The --color-words code was the only user of color_fwrite_lines() so
I tweaked it according to my needs. But that makes it highly
diff-specific again, so it's not in color.c any more. Did anyone
else intend to use it?
* The Tk part of the patch is 95% voodoo of the
cut&paste-from-elsewhere vintage and I have no clue whether it works
only by accident
* I still need to do some things: add docs for --porcelain, add tests
to the first patch, move the gitk patch to affect only the subtree
* I'm not even burning midnight oil any more
Thomas Rast (2):
Add diff --porcelain option for --color-words
gitk: add the equivalent of diff --color-words
color.c | 28 ---------------
color.h | 1 -
diff.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++---------
diff.h | 1 +
gitk-git/gitk | 29 +++++++++++++++-
5 files changed, 116 insertions(+), 48 deletions(-)
next reply other threads:[~2010-03-31 0:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-31 0:52 Thomas Rast [this message]
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
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=cover.1269996525.git.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=Johannes.Schindelin@gmx.de \
--cc=eelis@eelis.net \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
/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).