Re: [PATCH v2] help.c: configurable suggestions
- From
Drew DeVault <sir@cmpwn.com>
- Date
- Nov 17, 2020, 20:05 UTC
- Message-ID
- <C75T4RXIM970.2CVY5MIDCX25Q@taiga>
- In-Reply-To
- <xmqqd00b698g.fsf@gitster.c.googlers.com>
On Tue Nov 17, 2020 at 3:04 PM EST, Junio C Hamano wrote:
Show 7 quoted lines
> Drew DeVault <sir@cmpwn.com> writes: > > > This allows users to disable guessing the commands or options that they > > meant to use. > > --- > > Missing sign-off.
Whoops!
Show 7 quoted lines
> This changes behaviour for those who have relied on our promise that > any negative value means immediate execution. Now -2 means a totally > different thing. > > I thought I already showed you how to make it a "number or keyword" > in my previous review comment to avoid such a needless behaviour > change---did our mails cross?
I must not have understood the psuedocode you sent. I'll take another look at it. Thanks for the feedback!
Show 8 quoted lines
> > @@ -586,7 +597,7 @@ const char *help_unknown_cmd(const char *cmd)
> > n++)
> > ; /* still counting */
> > }
> > - if (autocorrect && n == 1 && SIMILAR_ENOUGH(best_similarity)) {
> > + if (autocorrect != 0 && n == 1 && SIMILAR_ENOUGH(best_similarity)) {
>
> I see there is nothing gained by writing "!= 0" explicitly here.*shrug*