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

Re: [PATCH] help.autocorrect: do not run a command if the command given is junk

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 14, 2009, 14:16 UTC
Message-ID
<alpine.DEB.1.00.0912141515430.4985@pacific.mpi-cbg.de>
In-Reply-To
<4B263797.5070808@viscovery.net>
Hi,
On Mon, 14 Dec 2009, Johannes Sixt wrote:
Show 21 quoted lines
> From: Johannes Sixt <j6t@kdbg.org>
> 
> If a given command is not found, then help.c tries to guess which one the
> user could have meant. If help.autocorrect is 0 or unset, then a list of
> suggestions is given as long as the dissimilarity between the given command
> and the candidates is not excessively high. But if help.autocorrect was
> non-zero (i.e., a delay after which the command is run automatically), the
> latter restriction on dissimilarity was not obeyed.
> 
> In my case, this happened:
> 
>  $ git ..daab02
>  WARNING: You called a Git command named '..daab02', which does not exist.
>  Continuing under the assumption that you meant 'read-tree'
>  in 4.0 seconds automatically...
> 
> The similarity limit that this patch introduces is already used a few lines
> later where the list of suggested commands is printed.
> 
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
> ---
Obvious ACK from me.
Previous: Johannes SchindelinNext: Junio C Hamano
Message 4 of 11 in “help.autocorrect: do not run a command if the command given is junk”
  1. help.autocorrect: do not run a command if the command given is junkJohannes Sixt, Dec 14, 2009
  2. Alex RiesenDec 14, 2009
  3. Johannes SchindelinDec 14, 2009
  4. Johannes SchindelinDec 14, 2009
  5. Junio C HamanoDec 14, 2009
  6. Johannes SchindelinDec 14, 2009
  7. Junio C HamanoDec 14, 2009
  8. Johannes SchindelinDec 14, 2009
  9. Johannes SixtDec 14, 2009
  10. Junio C HamanoDec 14, 2009
  11. Johannes SixtDec 15, 2009

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.