mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <>
To: Johannes Schindelin <>
Cc: Philippe Blain <>,
	Git mailing list <>
Subject: Re: ["BUG"] builtin add-interactive does not honor 'color.diff. frag'
Date: Tue, 10 Nov 2020 13:01:51 -0500	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Tue, Nov 10, 2020 at 05:06:59PM +0100, Johannes Schindelin wrote:

> > but that is missing another thing: for historical reasons we allow both
> > color.diff.frag and diff.color.frag. TBH, I wouldn't be too sad to see
> > us drop support for the historical versions in this setting. But it
> > makes me wonder if we could be reusing the parsing from
> > git_diff_basic_config(), which handles both cases.
> Hmm. The Perl version uses the's `get_color()` function, which in
> turn invokes `git config --get-color` with the exact keys I pasted above.
> All along the way to `builtin/config.c`'s `git_get_color_config()`, I fail
> to see any `color.diff`/`diff.color` munging. So I believe that `git add
> --interactive` _never_ looked at the `diff.color` section to begin with.

Yeah, I think you're right. And I'm not too surprised. The same "I
wouldn't be too sad" probably applied back then, too.


> > I'm not entirely clear on how add-interactive.c invokes the diff, and
> > whether it would be unhappy to pick up diff config. But it seems like
> > this:
> [...]
> Hmm. I don't like it. So far, we were very careful to keep respecting
> `struct repository *r` in the built-in interactive add command. This would
> go the exact opposite way.
> Combined with the fact that we never supported `diff.color.*` in the
> interactive add command anyway, I would rather continue with the first
> variant you presented.

Yeah, that seems quite sensible to me.


  reply	other threads:[~2020-11-10 18:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06 16:31 ["BUG"] builtin add-interactive does not honor 'color.diff. frag' Philippe Blain
2020-11-06 17:03 ` Jeff King
2020-11-10 16:06   ` Johannes Schindelin
2020-11-10 18:01     ` Jeff King [this message]
2020-11-10 18:28     ` [PATCH] add-interactive.c: use correct names to load color.diff.* config Jeff King
2020-11-10 19:17       ` Johannes Schindelin
2020-11-10 19:48         ` Jeff King
2020-11-10 22:30           ` Johannes Schindelin

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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* 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.
Code repositories for project(s) associated with this public inbox

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 read-only IMAP folder(s) and NNTP newsgroup(s).