Re: [PATCH 2/2] expand --pretty=format color options
- From
Jeff King <peff@peff.net>
- Date
- Jan 18, 2009, 19:53 UTC
- Message-ID
- <20090118195342.GA612@coredump.intra.peff.net>
- In-Reply-To
- <20090118194328.GA31180@coredump.intra.peff.net>
On Sun, Jan 18, 2009 at 02:43:28PM -0500, Jeff King wrote:
Show 9 quoted lines
> Here is a patch that seems to work. It predicates pretty format colors > on diff colors, which is the same way the yellow commit header works in > log-tree. I don't know if it makes more sense to introduce yet another > color config option. > > And I say "seems to work" because I remember there being some trickery > with color flags sometimes not getting set properly. However, since this > is the same flag as the yellow commit header, and called around the same > time, I think it should be fine.
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.
Maybe it is time to do a cleanup on the color handling, which has provided no end of these bugs. I will have to leave that for another day, though.
-Peff