On Mon, Oct 10, 2016 at 9:28 PM, Jeff King <peff@xxxxxxxx> wrote: > On Mon, Oct 10, 2016 at 04:26:18PM +0700, Duy Nguyen wrote: > >> > If we do a revamp of the pretty-formats to bring them more in line with >> > ref-filter (e.g., something like "%(color:red)") maybe that would be an >> > opportunity to make minor adjustments. Though, hmm, it looks like >> > for-each-ref already knows "%(color:red)", and it's unconditional. >> > <sigh> So perhaps we would need to go through some deprecation period or >> > other transition. >> >> 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. Silence in two weeks. I vote (*) making %(<color-name>) honor --color and turning the %(auto, no-op, for both log family and for-each-ref. We could keep old behavior behind some environment variable if it's not much work so it keeps working while people come here and tell us about their use cases. (*) I know.. voting is not how things work around here, unless you vote with patches, but I can't take on another topic. > Reading the thread at: > > http://public-inbox.org/git/7v4njkmq07.fsf@xxxxxxxxxxxxxxxxxxxxxxxx/ > > 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). > > -Peff -- Duy