git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Edward Thomson <ethomson@edwardthomson.com>,
	Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] format_commit_message: honor `color=auto` for `%C(auto)`
Date: Tue, 31 May 2016 18:18:05 -0400	[thread overview]
Message-ID: <20160531221805.GB3824@sigill.intra.peff.net> (raw)
In-Reply-To: <CACsJy8BF6woZy8WUsJzVFqaMDCOMEYK-3xFNNeOQ6B+OMyqJLw@mail.gmail.com>

On Tue, May 31, 2016 at 07:23:32PM +0700, Duy Nguyen wrote:

> I think the (old) "auto" here means "automatically select the
> color" and what you do would be equivalent to %(auto,auto) where the
> first (and new) "auto" is about on/off switch, and the second is about
> selecting the actual color.

Ah, right. The current behavior does make more sense if you realize we
are talking about two different meaning of "auto" here.

> > I think it's worth mentioning this explicitly in the commit message. We
> > could also add "%C(on)", I guess, but it's unclear to me whether anybody
> > would want it (they would probably just use "--color" in that case,
> > unless they really want unconditional coloring for just _some_
> > elements).
> 
> If I could redo, I would go with %C(default) instead of %C(auto) then
> we could have %C(auto,default). Perhaps we can make %C(auto) an
> equivalent of %C(auto,default) now (i.e. exactly what this patch does)
> and at some point in future add %C(default) which is what %C(auto) is
> now if people really need to force it on?

That makes a lot of sense to me. It does change the current meaning of
"%C(auto)", but the current state is sufficiently confusing that I think
we can call the existing behavior a bug. I'm ambivalent on either
implementing %C(default) now, or waiting until somebody actually wants
it.

Thanks for clarifying the history.

-Peff

  reply	other threads:[~2016-05-31 22:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25  1:56 [PATCH] format_commit_message: honor `color=auto` for `%C(auto)` Edward Thomson
2016-05-25 22:39 ` Jeff King
2016-05-27  3:47   ` Edward Thomson
2016-05-31 12:23   ` Duy Nguyen
2016-05-31 22:18     ` Jeff King [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-05-27  3:46 Edward Thomson
2016-05-27  3:55 ` Jeff King
2016-05-27  6:22   ` Junio C Hamano
2016-05-24 19:48 Edward Thomson
2016-05-25  0:55 ` Junio C Hamano
2016-05-25  1:26   ` Edward Thomson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160531221805.GB3824@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=ethomson@edwardthomson.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).