From: Pierre Habouzit Date: Sun, 10 Feb 2008 23:29:20 GMT Subject: Re: Alternative approach to the git config NULL value checking patches.. Message-ID: <20080210232920.GH5129@artemis.madism.org> In-Reply-To: <7v7ihce8ex.fsf@gitster.siamese.dyndns.org> On Sun, Feb 10, 2008 at 10:47:02PM +0000, Junio C Hamano wrote: > Junio C Hamano writes: > > > But as you seem to imply, it might make sense to equate > > > > [some-random-section] > > some-random-variable > > > > to > > > > [some-random-section] > > some-random-variable = "" > > > > for variables that cannot possibly have any meaningful "bool" > > semantics. This third class of variables is a possible benefit > > your patch brings in. The code can be lax for these variables. > > > > However, it would make things inconsistent ("this variable is > > bool and the above two forms mean completely opposite things, > > while that variable is not bool and they mean the same thing"). > > I am just having a hard time convincing myself that this little > > detail does not matter. > > Having said all that, it might be an option to change your patch > slightly to say: > > const char config_true[] = "true"; I was about to suggest the same, and testing against "config_true" just becomes an optimization, but isn't required. Seems an appropriate hack to me. -- ·O· Pierre Habouzit ··O madcoder@debian.org OOO http://www.madism.org