From: Junio C Hamano Date: Wed, 11 Nov 2026 17:50:40 GMT Subject: Re: [PATCH 08/15] merge: handle NULL value for branch..mergeOptions Message-ID: In-Reply-To: Phillip Wood writes: > To me confusing thing is that we don't treat those two the same way - > I'd find it much easier to reason about if empty and missing values were > always treated the same and booleans required an explicit value, but it > is too late to change that now. The "valueless true" was there from the beginning, as can be seen in 17712991a5 (Add ".git/config" file parser, 2005-10-10): From: Linus Torvalds Date: Mon, 10 Oct 2005 16:31:08 -0700 Subject: [PATCH] Add ".git/config" file parser This is a first cut at a very simple parser for a git config file. The format of the file is a simple ini-file like thing, ... diff --git a/config.c b/config.c new file mode 100644 index 0000000000..f3c4fa42ac --- /dev/null +++ b/config.c @@ -0,0 +1,222 @@ ... +int git_config_bool(const char *name, const char *value) +{ + if (!value) + return 1; + if (!*value) + return 0; + if (!strcasecmp(value, "true")) + return 1; + if (!strcasecmp(value, "false")) + return 0; + return git_config_int(name, value) != 0; +} So I agree that it is way too late to change now.