Re: [PATCH 1/2] handle color.ui at a central place
Show 12 quoted lines
> 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.
Show 7 quoted lines
> 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