Re: [PATCH v4 3/3] rebase: add a config option for --rebase-merges
From: Alex Henrie <hidden>
Date: 2023-02-24 17:49:36
On Fri, Feb 24, 2023 at 6:53 AM Johannes Schindelin [off-list ref] 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:quoted
+ 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