git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Drew DeVault" <sir@cmpwn.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: <git@vger.kernel.org>, "lanodan" <contact+git@hacktivis.me>
Subject: Re: [PATCH v2] help.c: configurable suggestions
Date: Tue, 17 Nov 2020 15:05:41 -0500	[thread overview]
Message-ID: <C75T4RXIM970.2CVY5MIDCX25Q@taiga> (raw)
In-Reply-To: <xmqqd00b698g.fsf@gitster.c.googlers.com>

On Tue Nov 17, 2020 at 3:04 PM EST, Junio C Hamano wrote:
> 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!

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

  reply	other threads:[~2020-11-17 20:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 15:25 [PATCH v2] help.c: configurable suggestions Drew DeVault
2020-11-17 20:04 ` Junio C Hamano
2020-11-17 20:05   ` Drew DeVault [this message]
2020-11-17 21:25 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C75T4RXIM970.2CVY5MIDCX25Q@taiga \
    --to=sir@cmpwn.com \
    --cc=contact+git@hacktivis.me \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).