git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [small bug] Surprising "Did you mean this?"

From
Andreas Ericsson <ae@op5.se>
Date
Nov 18, 2008, 18:29 UTC
Message-ID
<492309A4.1050702@op5.se>
In-Reply-To
<vpqod0dezh9.fsf@bauges.imag.fr>
Matthieu Moy wrote:
Show 14 quoted lines
> Hi,
> 
> The following is quite surprising:
> 
>   $ git tags 
>   git: 'tags' is not a git-command. See 'git --help'.
>   
>   Did you mean this?
>           status
>   
> I would have expected git to propose me "tag" (1 character removal),
> while "status" is quite far from "tags" (remove g, add u, add another
> t, shuffle and you're there).
> 

That's the Deveraux(?) addendum in action. shuffle+replace = 3 in the distance score, while remove = 4 (I think).

Typos by users accustomed to computers are more often of the shuffle (haed vs head) or replace (hwad vs head) kind, while those less accustomed often fumble more and press more keys. For this case though, I agree it gives a rather strange result.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Matthieu MoyNext: Samuel Tardieu
Message 2 of 3 in “[small bug] Surprising "Did you mean this?"”
  1. Matthieu MoyNov 18, 2008
  2. Andreas EricssonNov 18, 2008
  3. Samuel TardieuNov 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.