Re: [PATCH 2/2] expand --pretty=format color options
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 20, 2009, 10:36 UTC
- Message-ID
- <alpine.DEB.1.00.0901201133280.3586@pacific.mpi-cbg.de>
- In-Reply-To
- <alpine.DEB.1.00.0901201126500.3586@pacific.mpi-cbg.de>
Hi,
On Tue, 20 Jan 2009, Johannes Schindelin wrote:
Show 19 quoted lines
> On Mon, 19 Jan 2009, Jeff King wrote: > > > On Mon, Jan 19, 2009 at 03:10:56PM -0800, Junio C Hamano wrote: > > > > > > Hrm. OK, it doesn't actually work always. It does for git-log, but > > > > not for rev-list, which leaves diff_use_color_default as -1. I > > > > don't know if there are any other ways you can get to this code > > > > path without having set diff_use_color_default. > > > > > > Yuck, no matter what you do please don't contaminate plumbing with > > > the UI color options. > > > > 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.
Ciao, Dscho