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

Re: [PATCH] pretty: respect color settings for %C placeholders

From
Duy Nguyen <pclouds@gmail.com>
Date
Oct 11, 2016, 10:59 UTC
Message-ID
<CACsJy8ABn_hp4nC-7ao7UPLc1vrC1B+50YwaRNyK5J-H_7f6JQ@mail.gmail.com>
In-Reply-To
<20161010151517.6wszhuyp57yfncaj@sigill.intra.peff.net>
On Mon, Oct 10, 2016 at 10:15 PM, Jeff King <peff@peff.net> wrote:
Show 24 quoted lines
> On Mon, Oct 10, 2016 at 10:28:18AM -0400, Jeff King wrote:
>
>> > We could add some new tag to change the behavior of all following %C
>> > tags. Something like %C(tty) maybe (probably a bad name), then
>> > discourage the use if "%C(auto" for terminal detection?
>>
>> Yeah, adding a "%C(enable-auto-color)" or something would be backwards
>> compatible and less painful than using "%C(auto)" everywhere. I do
>> wonder if anybody actually _wants_ the "always show color, even if
>> --no-color" behavior. I'm having trouble thinking of a good use for it.
>>
>> IOW, I'm wondering if anyone would disagree that the current behavior is
>> simply buggy. Reading the thread at:
>>
>>   http://public-inbox.org/git/7v4njkmq07.fsf@alter.siamese.dyndns.org/
>>
>> I don't really see any compelling reason against it (there was some
>> question of which config to use, but we already answered that with
>> "%C(auto)", and use the value from the pretty_ctx).
>
> So here's what a patch to do that would look like. I admit that "I can't
> think of a good use" does not mean there _isn't_ one, but perhaps by
> posting this, it might provoke other people to think on it, too. And if
> nobody can come up with, maybe it's a good idea.

I think you covered all bases with %C(always,..) and updating for-each-ref code. And changing behavior of visual features like this sounds more like "evolving" than "breaking backward compatibility" to me. So +1.

-- 
Duy
Previous: Jeff KingNext: Duy Nguyen
Message 16 of 23 in “%C(auto) not working as expected”
  1. Tom HaleOct 9, 2016
  2. René ScharfeOct 9, 2016
  3. Tom HaleOct 9, 2016
  4. René ScharfeOct 9, 2016
  5. Jeff KingOct 9, 2016
  6. Duy NguyenOct 10, 2016
  7. Jeff KingOct 10, 2016
  8. pretty: respect color settings for %C placeholdersJeff King, Oct 10, 2016
  9. René ScharfeOct 10, 2016
  10. Jeff KingOct 10, 2016
  11. René ScharfeOct 10, 2016
  12. Jeff KingOct 10, 2016
  13. Junio C HamanoOct 10, 2016
  14. Jeff KingOct 10, 2016
  15. Jeff KingOct 10, 2016
  16. Duy NguyenOct 11, 2016
  17. Duy NguyenOct 25, 2016
  18. Jeff KingOct 25, 2016
  19. Duy NguyenOct 25, 2016
  20. René ScharfeOct 10, 2016
  21. Jeff KingOct 10, 2016
  22. pretty: fix document link for color specificationRené Scharfe, Oct 11, 2016
  23. Jeff KingOct 11, 2016

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.