Re: [PATCH 08/15] merge: handle NULL value for branch.<name>.mergeOptions
- From
Ben Knoble <ben.knoble@gmail.com>
- Date
- Nov 11, 2026, 15:26 UTC
- Message-ID
- <C8BC29A0-8AA2-47C6-9246-19AFAB54D074@gmail.com>
- In-Reply-To
- <b298dd66-49b8-4019-aecd-e6dfffa2f89c@gmail.com>
Show 21 quoted lines
> Le 11 nov. 2026 à 09:47, Phillip Wood <phillip.wood123@gmail.com> a écrit : > > On 10/11/2026 16:53, Junio C Hamano wrote: >> Sorry but I do not understand this comment. >> [branch "main"] mergeOptions = >> is an explicit "there is no extra options when we make a merge". >> [branch "main"] mergeOptions >> is an attempt to set a configuration variable to boolean "true". > > Oh, I'd forgotten we treat a missing value as "true" even for config settings that expect a non-boolen value. > >> I am not sure if it helps users to pretend as if the latter were >> [branch "main"] mergeOptions = >> if that is what you are hinting. It would confuse them when they >> see a true boolean variable >> [branch "main"] rebase >> and wonder why >> [branch "main"] rebase = >> does not behave the same way, no? > > 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,
Ditto.
> but it is too late to change that now.
Just thinking aloud, a “[config] strict = true” directive could affect parsing the rest of the directives after it (including included files)? I’d also want a way to affect .git/config without editing them all, but…
Anyway, not something to derail this topic with, but something to muse on for a future feature?