Re: [PATCH v2] help: interpret boolean string values for help.autocorrect
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 10, 2025, 15:02 UTC
- Message-ID
- <xmqq1pxaaf0n.fsf@gitster.g>
- In-Reply-To
- <20250110121100.GE1014503@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> It's not corrupted; that syntax is allowed for boolean variables[1]. The > "bad config line" is due to the early "return config_error_nonbool(var)" > quoted above. It is passing the error back to the general config code, > which then just prints the "bad config" line. > > I think what Junio is saying is that if we are going to turn this into > an option which accepts bool values, it should accept this special > syntax, too. And that first "if (!value)" has to either go away (and get > replace by a maybe_bool() call, as mentioned earlier) or has to set > AUTOCORRECT_IMMEDIATELY itself.
Exactly.
Thanks for filling the blank in for me while I was away from the keyboard ;-)