Re: [PATCH v4 3/3] rebase: add a config option for --rebase-merges
- From
Alex Henrie <alexhenrie24@gmail.com>
- Date
- Feb 24, 2023, 17:49 UTC
- Message-ID
- <CAMMLpeRoPnj2-YXo3tOcqU2oqx1RokocZSvU-4hXV7rdMEBDXw@mail.gmail.com>
- In-Reply-To
- <c918797c-75cc-80d4-c978-360388877d63@gmx.de>
On Fri, Feb 24, 2023 at 6:53 AM Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 5 quoted lines
> 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.).
Show 16 quoted lines
> 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