From: Patrick Steinhardt Date: Tue, 17 Feb 2026 09:05:08 GMT Subject: Re: [PATCH v2 06/13] config: format bools or ints gently Message-ID: In-Reply-To: <0a428d2ffe092c2af6789b5e698dc769b0eb883a.1771026918.git.gitgitgadget@gmail.com> On Fri, Feb 13, 2026 at 11:55:11PM +0000, Derrick Stolee via GitGitGadget wrote: > diff --git a/builtin/config.c b/builtin/config.c > index 2c169fc126..2c93e1725b 100644 > --- a/builtin/config.c > +++ b/builtin/config.c > @@ -274,6 +274,34 @@ static int format_config_bool(struct strbuf *buf, > return 0; > } > > +static int format_config_bool_or_int(struct strbuf *buf, > + const char *key_, > + const char *value_, > + const struct key_value_info *kvi, > + int gently) > +{ > + int v, is_bool = 0; > + > + if (gently) { > + v = git_parse_maybe_bool_text(value_); This function also returns `1` in case `!value`. Is this intended? I guess so due to our implicit bool thingy, and `git_config_bool_or_int()` seems to behave the same. Patrick