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

Re: [PATCH] pretty.c: Make user defined format honor color option

From
Jeff King <peff@peff.net>
Date
Mar 17, 2011, 19:49 UTC
Message-ID
<20110317194952.GF20508@sigill.intra.peff.net>
In-Reply-To
<1300366792.3269.24.camel@wpalmer.simply-domain>
On Thu, Mar 17, 2011 at 12:59:52PM +0000, Will Palmer wrote:
Show 8 quoted lines
> Perhaps --color=auto, specified on the command-line, should behave
> differently to the various color options specified via config. That
> might make both sides happy, as one could always specify --color=auto to
> explicitly tell git to only color if it thinks it should.
> 
> Can anyone else refresh my memory regarding the use-case where
> hand-specified colors really should have an effect even with
> --color=never?

Without doing any digging on the list and just from the top of my head, I don't think it was ever really an intentional feature that format should ignore color settings. It simply wasn't bothered with because in the beginning, the only way to specify a format was on the command line. Now as we see them used in aliases, it probably makes sense to respect the color setting. If one wants the current behavior, they can always use --color=always.

So I think the intent of Thomas' patch is a good change, though I haven't really looked closely at the patch itself.

-Peff
Previous: Will PalmerNext: Thomas Egerer
Message 5 of 6 in “pretty.c: Make user defined format honor color option”
  1. pretty.c: Make user defined format honor color optionThomas Egerer, Mar 17, 2011
  2. Will PalmerMar 17, 2011
  3. Thomas EgererMar 17, 2011
  4. Will PalmerMar 17, 2011
  5. Jeff KingMar 17, 2011
  6. Thomas EgererMar 17, 2011

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.