Re: [PATCH v2] help.c: configurable suggestions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue Nov 17, 2020 at 3:04 PM EST, Junio C Hamano wrote:
> Drew DeVault <sir@xxxxxxxxx> writes:
>
> > This allows users to disable guessing the commands or options that they
> > meant to use.
> > ---
>
> Missing sign-off.

Whoops!

> 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!

> > @@ -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*




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux