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

Re: [PATCH 2/2] expand --pretty=format color options

From
Jeff King <peff@peff.net>
Date
Jan 20, 2009, 14:23 UTC
Message-ID
<20090120142301.GC10688@sigill.intra.peff.net>
In-Reply-To
<alpine.DEB.1.00.0901201133280.3586@pacific.mpi-cbg.de>
On Tue, Jan 20, 2009 at 11:36:08AM +0100, Johannes Schindelin wrote:
Show 13 quoted lines
> > > Of course. But the problem is that rev-list is _already_ contaminated 
> > > by --pretty=format:%Cred. Or do you mean, you really want rev-list to 
> > > unconditionally output color in such a case?
> > 
> > No, rev-list is not contaminated with UI color options.  %Cred _always_ 
> > outputs the color, even when the user turned off color explicitely, 
> > using --no-color.
> 
> BTW I would find it very logical for rev-list not to output any color at 
> all when %C(yellow) is specified, as your code respects the diff UI 
> options, which are implicitly turned off for rev-list (as rev-list is no 
> UI), just like the coloring of "commit <name>" is implicitly turned off 
> for rev-list.

Now I'm confused. Should color in --pretty=format always be on, or should it respect color settings? You seem to be advocating both sides in the two paragraphs.

The behavior I would propose it along the lines of:
 - plumbing _always_ has color off
 - porcelain respects color.* config, --color, etc
-Peff
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 35 of 40 in “Re: [PATCH 3/3] Adds a #!bash to the top of bash completions so that editors can recognize, it as a bash script. Also adds a few simple comments above commands that, take arguments. The comments are meant to remind editors of potential, problems that”
  1. BazJan 16, 2009
  2. Jeff KingJan 17, 2009
  3. Markus HeidelbergJan 17, 2009
  4. Jeff KingJan 17, 2009
  5. 1/2 color: make it easier for non-config to parse color specsJeff King, Jan 17, 2009
  6. René ScharfeJan 18, 2009
  7. Jeff KingJan 18, 2009
  8. Jeff KingJan 18, 2009
  9. René ScharfeJan 18, 2009
  10. Jeff KingJan 18, 2009
  11. 2/2 expand --pretty=format color optionsJeff King, Jan 17, 2009
  12. René ScharfeJan 18, 2009
  13. Jeff KingJan 18, 2009
  14. Jeff KingJan 18, 2009
  15. Jeff KingJan 18, 2009
  16. 1/2 handle color.ui at a central placeMarkus Heidelberg, Jan 18, 2009
  17. 2/2 move the color variables to color.cMarkus Heidelberg, Jan 18, 2009
  18. Jeff KingJan 20, 2009
  19. Markus HeidelbergJan 21, 2009
  20. Jeff KingJan 22, 2009
  21. Markus HeidelbergJan 22, 2009
  22. Junio C HamanoJan 23, 2009
  23. Markus HeidelbergJan 24, 2009
  24. Johannes SchindelinJan 24, 2009
  25. Markus HeidelbergJan 24, 2009
  26. Junio C HamanoJan 24, 2009
  27. Jeff KingJan 24, 2009
  28. Junio C HamanoJan 24, 2009
  29. Jeff KingJan 24, 2009
  30. Markus HeidelbergJan 25, 2009
  31. Junio C HamanoJan 19, 2009
  32. Jeff KingJan 20, 2009
  33. Johannes SchindelinJan 20, 2009
  34. Johannes SchindelinJan 20, 2009
  35. Jeff KingJan 20, 2009
  36. Johannes SchindelinJan 20, 2009
  37. Jeff KingJan 20, 2009
  38. Cyellow, was Re: [a way-too-long line]Johannes Schindelin, Jan 17, 2009
  39. Jeff KingJan 17, 2009
  40. Johannes SchindelinJan 17, 2009

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.