From: Jeff King Date: Wed, 27 Aug 2014 04:46:21 GMT Subject: Re: [PATCH v6 2/6] Add git_env_ulong() to parse environment variable Message-ID: <20140827044621.GA32141@peff.net> In-Reply-To: On Tue, Aug 26, 2014 at 02:54:11PM -0700, Junio C Hamano wrote: > A worse position is to have git_env_bool() that says "empty is > false" and add a new git_env_ulong() that says "empty is unset". > > We should pick one or the other and use it for both. Yeah, I agree they should probably behave the same. > > The middle ground would be to die(). That does not seem super-friendly, but > > then we would also die with GIT_SMART_HTTP=foobar, so perhaps it is not > > unreasonable to just consider it a syntax error. > > Hmm, I am not sure if dying is better. Unless we decide to make > empty string no longer false everywhere and warn now and then later > die as part of a 3.0 transition plan or something, that is. I think it is better in the sense that while it may be unexpected, it does not unexpectedly do something that the user cannot easily undo. I really do not think this topic is worth the effort of a long-term deprecation scheme (which I agree _is_ required for a change to the config behavior). Let's just leave it as-is. We've seen zero real-world complaints, only my own surprise after reading the code (and Steffen's patch should be tweaked to match). -Peff