From: Markus Heidelberg Date: Wed, 21 Jan 2009 22:35:24 GMT Subject: Re: [PATCH 1/2] handle color.ui at a central place Message-ID: <200901212335.24727.markus.heidelberg@web.de> In-Reply-To: <20090120040448.GA30714@sigill.intra.peff.net> Jeff King, 20.01.2009: > On Sun, Jan 18, 2009 at 09:37:15PM +0100, Markus Heidelberg wrote: > > > Not sure, if you it has something to do with the following, but I had > > this in my tree for some days now, waiting for the 2 commits mentioned > > in the log message to graduate to master, which happend just an hour or > > so ago. > > I think this is probably an improvement, but I had in mind something a > little more drastic. Right now we keep munging one variable that is our > current idea of "should we do color" based on multiple config values. > Then you end up with (best case) this "finalize color config", which is > a bit ugly, or (worst case) bugs where the value hasn't always been Yes, I didn't find it to be that great either. > properly initialized (or finalized). > > So I think it makes more sense to record each config value, and then > check a _function_ that does the right thing. I.e., you end up with > something like: > > [example code snipped] That would probably be better. Markus