From: Junio C Hamano <gitster@pobox.com>
To: Wincent Colaiuta <win@wincent.com>
Cc: "git@vger.kernel.org List" <git@vger.kernel.org>
Subject: Re: RFC: git diff colorization idea
Date: Thu, 22 Jan 2009 16:32:49 -0800 [thread overview]
Message-ID: <7vhc3q6evi.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <53497057-1ADE-4300-9F35-B218959606FE@wincent.com> (Wincent Colaiuta's message of "Fri, 23 Jan 2009 01:00:27 +0100")
Wincent Colaiuta <win@wincent.com> writes:
> I'm also thinking that perhaps a per-character approach might be
> useful here instead of a per-word one (it would make that last hunk
> look better in the mock-up screenshot that I posted); if I go the per-
> character route then that suggests that "--color-chars" might be the
> right option name, and the color slots would then be
> color.diff.new.char and color.diff.old.char.
>
> Any feedback or suggestions before I get in too deep?
I personally find your "prposal" picture too loud to my eye.
I would have expected you to propose something like this:
| _git_remote ()
| {
|- local subcommands="add rm show prune <red>update</red>"
|+ local subcommands="add <green>rename</green> rm show prune"
| local subcommand=$(__git_find_subcommand "$subcommands")"
| if ...
if the patch were to remove update and add rename, that is. If there is
no deletion but only insertion, you would only see green.
And that way you do not need new color slots. You can use new color and
old color as before, and the coloring will be done to highlight only the
parts that really matter.
If you were to go this route, I suspect that showing the unchanged part on
the preimage line in light gray might make sense, like:
| _git_remote ()
| {
|- <gray>local subcommands="add rm show prune<gray> <red>update</red>"
|+ local subcommands="add <green>rename</green> rm show prune"
| local subcommand=$(__git_find_subcommand "$subcommands")"
| if ...
because there will be the same chars/words on the postimage line anyway.
Just 2c from somebody who does not like colors very much.
next prev parent reply other threads:[~2009-01-23 0:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 0:00 RFC: git diff colorization idea Wincent Colaiuta
2009-01-23 0:32 ` Junio C Hamano [this message]
2009-01-23 6:16 ` Wincent Colaiuta
2009-01-23 6:45 ` Junio C Hamano
2009-01-23 8:28 ` Nanako Shiraishi
2009-01-23 18:40 ` Jakub Narebski
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=7vhc3q6evi.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=win@wincent.com \
/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).