Re: [PATCH 2/2] expand --pretty=format color options
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 20, 2009, 14:58 UTC
- Message-ID
- <alpine.DEB.1.00.0901201553200.5159@intel-tinevez-2-302>
- In-Reply-To
- <20090120142301.GC10688@sigill.intra.peff.net>
Hi,
On Tue, 20 Jan 2009, Jeff King wrote:
Show 19 quoted lines
> On Tue, Jan 20, 2009 at 11:36:08AM +0100, Johannes Schindelin wrote: > > > > > 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. > > Now I'm confused. Should color in --pretty=format always be on, or > should it respect color settings? You seem to be advocating both sides > in the two paragraphs.
No, I am just very bad at relating my thoughts.
What I tried to say is "plumbing does not, and should not, change behavior depending on diff.color".
With %Cred, I was just lazy, and did not make a check if diff.color is true, which I regret now.
But then, its behavior still does not depend on diff.color when using plumbing.
It does not even depend on it when using porcelain :-)
Show 5 quoted lines
> The behavior I would propose it along the lines of: > > - plumbing _always_ has color off > > - porcelain respects color.* config, --color, etc
Right, that'd be the sane behavior, even for %Cred.
Ciao, Dscho