From: Alex Henrie Date: Fri, 24 Feb 2023 17:49:21 GMT Subject: Re: [PATCH v4 3/3] rebase: add a config option for --rebase-merges Message-ID: In-Reply-To: On Fri, Feb 24, 2023 at 6:53 AM Johannes Schindelin wrote: > in config value parsing, a "maybe-bool" with a > NULL value is considered to be equivalent to `true`! (See > `git_parse_maybe_bool_text()` or > https://git-scm.com/docs/git-config#Documentation/git-config.txt-true for > details.). > On Wed, 22 Feb 2023, Alex Henrie wrote: > > > + if (!strcmp(var, "rebase.merges") && value && *value) { > > Why do we require a non-empty `value` here? > > [rebase] > merges > > should be equivalent to `true`, > > [rebase] > merges = > > should probably be equivalent to `false`, and both are handled correctly > by `git_parse_maybe_bool()`. I didn't know that there was already an established convention for what NULL and "" mean for boolean config values. I should have looked at the source code of git_parse_maybe_bool more carefully. That does change things because we're going to want to follow the established convention here. -Alex