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

Re: [PATCH/RFC] "color.diff = true" is not "always" anymore.

From
Jeff King <peff@peff.net>
Date
Nov 28, 2007, 19:04 UTC
Message-ID
<20071128190439.GA11396@coredump.intra.peff.net>
In-Reply-To
<7vd4tuakzj.fsf_-_@gitster.siamese.dyndns.org>
On Tue, Nov 27, 2007 at 11:26:56PM -0800, Junio C Hamano wrote:
Show 6 quoted lines
> Too many people got burned by setting color.diff and color.status to
> true when they really should have set it to "auto".
> 
> This makes only "always" to do the unconditional colorization, and
> change the meaning of "true" to the same as "auto": colorize only when
> we are talking to a terminal.

I think this is a good change. However, there needs to be a matching change for all scripts which read the color.* variables (git-svn is the only one now, I think, but Dan's git-add--interactive patch does the same thing).

It would be nice to have a "git config --colorbool" option, but it has the unfortunate problem that the stdout of "git config" is piped back to the caller, so the isatty check is meaningless (and the "pager in use" is similarly tricky). Perhaps it should go in Git.pm, so it at least only needs to be written once.

-Peff
Previous: Johannes SchindelinNext: Junio C Hamano
Message 7 of 10 in “Use --no-color option on git log commands.”
  1. Use --no-color option on git log commands.Pascal Obry, Nov 26, 2007
  2. Junio C HamanoNov 26, 2007
  3. Pascal ObryNov 27, 2007
  4. Junio C HamanoNov 28, 2007
  5. "color.diff = true" is not "always" anymore.Junio C Hamano, Nov 28, 2007
  6. Johannes SchindelinNov 28, 2007
  7. Jeff KingNov 28, 2007
  8. Junio C HamanoDec 1, 2007
  9. Jeff KingDec 1, 2007
  10. Junio C HamanoDec 1, 2007

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.