Re: [PATCH 4/5] Let git-add--interactive read colors from configuration
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 23, 2007, 09:17 UTC
- Message-ID
- <7vk5o9uxqq.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20071123090918.GC5196@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Note that there is one tricky part of config_bool, which is what
> config_bool('my.key', undef) should do (is it "default false" or "no
> default"?).I am glad somebody finally got to the trick question I posed earlier ;-)
But config_bool('key') and config_bool('key', undef) would both return undef to say "The value is false" when key does not exist, so it was not much of a trick. It does not make a difference if the undef came because the default parameter was undef, or because there was no default parameter given and the built-in behaviour of config_bool() was to return undef for a missing key.