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

Re: [PATCH] add--interactive: allow diff colors without interactive colors

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 5, 2008, 00:20 UTC
Message-ID
<7v3atdi0na.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080104083521.GB3354@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> Users with color.diff set to true/auto will not see color in
> "git add -i" unless they also set color.interactive.
>
> However, some users may want just one without the other, so
> there's no reason to tie them together.
>
> Note that there is now no way to have color on for "git
> diff" but not for diffs from "git add -i"; such a
> configuration seems unlikely, though.

Although I would agree with what this patch does, I think you are contradicting with yourself in the above justification. Some users may want to color "git diff" output but not interaction with "git add -i", and that's also "just one without the other", but you just tied them together, only differently, and "seems unlikely" is a rather weak excuse.

The justification should instead be: having more independent knobs is not necessarily better. The user should not have to tweak too many knobs.

In the longer term, I think we should try reducing the number of knobs by giving "color.git" that allows you to pretend as if all of the "color.interactive", "color.diff", "color.status", "color.someothercolorizedcommand" are all set. I do not think being able to control the use of colors per command is giving much other than confusion to the user.

That may not be so easy with the current structure of the config reader, though.

Previous: Jeff KingNext: Jeff King
Message 2 of 17 in “add--interactive: allow diff colors without interactive colors”
  1. add--interactive: allow diff colors without interactive colorsJeff King, Jan 4, 2008
  2. Junio C HamanoJan 5, 2008
  3. Jeff KingJan 5, 2008
  4. Junio C HamanoJan 5, 2008
  5. Jeff KingJan 5, 2008
  6. Junio C HamanoJan 5, 2008
  7. Jeff KingJan 5, 2008
  8. Matthias KestenholzJan 5, 2008
  9. Junio C HamanoJan 5, 2008
  10. Matthias KestenholzJan 5, 2008
  11. 1/4 Add infrastructure for a single color config variableMatthias Kestenholz, Jan 5, 2008
  12. 2/4 git branch: Use color configuration infrastructureMatthias Kestenholz, Jan 5, 2008
  13. 3/4 status and commit: Use color configuration infrastructureMatthias Kestenholz, Jan 5, 2008
  14. 4/4 diff and log: Use color configuration infrastructureMatthias Kestenholz, Jan 5, 2008
  15. Jeff KingJan 8, 2008
  16. Matthias KestenholzJan 8, 2008
  17. Jakub NarebskiJan 5, 2008

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.