Re: [PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-31 Thread Jeff King
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.

Re: [PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-31 Thread Duy Nguyen
On Thu, May 26, 2016 at 5:39 AM, Jeff King wrote: > On Tue, May 24, 2016 at 08:56:49PM -0500, Edward Thomson wrote: > >> Check that we are configured to display colors in the given context when >> the user specifies a format string of `%C(auto)`. This brings that >> behavior in line with the beha

Re: [PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-26 Thread Junio C Hamano
Jeff King writes: > I suspect Junio can just tweak that while applying, unless there's > another reason to re-roll. > > (Also for anybody watching, Ed did not just make up my signoff; I gave > it to him off-list). Understood. Thanks. -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-26 Thread Jeff King
On Thu, May 26, 2016 at 10:46:10PM -0500, Edward Thomson wrote: > git-log(1) documents that when specifying the `%C(auto)` format > placeholder will "turn on auto coloring on the next %placeholders > until the color is switched again." > > However, when `%C(auto)` is used, the present implementat

Re: [PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-26 Thread Edward Thomson
On Wed, May 25, 2016 at 05:39:04PM -0500, Jeff King wrote: > Looks like we didn't have any tests at all for %C(auto). And the tests > for %C(auto,...) were labeled as %C(auto), making it all the more > confusing. Perhaps it is worth squashing this in: Thanks, peff. Indeed I did squash that into m

[PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-26 Thread Edward Thomson
git-log(1) documents that when specifying the `%C(auto)` format placeholder will "turn on auto coloring on the next %placeholders until the color is switched again." However, when `%C(auto)` is used, the present implementation will turn colors on unconditionally (even if the color configuration is

Re: [PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-25 Thread Jeff King
On Tue, May 24, 2016 at 08:56:49PM -0500, Edward Thomson wrote: > Check that we are configured to display colors in the given context when > the user specifies a format string of `%C(auto)`. This brings that > behavior in line with the behavior of `%C(auto,)`, which will > display the given color

[PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-24 Thread Edward Thomson
Check that we are configured to display colors in the given context when the user specifies a format string of `%C(auto)`. This brings that behavior in line with the behavior of `%C(auto,)`, which will display the given color only when the configuration specifies to do so. This allows the user th

Re: [PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-24 Thread Edward Thomson
On Tue, May 24, 2016 at 05:55:02PM -0700, Junio C Hamano wrote: > Looks obviously the right thing to do from a cursory read. > Missing sign-off? Yes, apologies for the oversight; will re-send. Thanks- -ed -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message t

Re: [PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-24 Thread Junio C Hamano
On Tue, May 24, 2016 at 12:48 PM, Edward Thomson wrote: > Check that we are configured to display colors in the given context when > the user specifies a format string of `%C(auto)`, instead of always > displaying the default color for the given context. This makes > `%C(auto)` obey the `color=au

[PATCH] format_commit_message: honor `color=auto` for `%C(auto)`

2016-05-24 Thread Edward Thomson
Check that we are configured to display colors in the given context when the user specifies a format string of `%C(auto)`, instead of always displaying the default color for the given context. This makes `%C(auto)` obey the `color=auto` setting and brings its behavior in line with the behavior of