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

Re: [PATCH] git wrapper: also uses aliases to suggest mistyped commands

From
PBPieter de Bie <pdebie@ai.rug.nl>
Date
Sep 11, 2008, 10:37 UTC
Message-ID
<9FACD5FA-7BAE-40B9-B378-165BAEAF2045@ai.rug.nl>
In-Reply-To
<7vtzcnvfq4.fsf@gitster.siamese.dyndns.org>
On 10 sep 2008, at 23:44, Junio C Hamano wrote:
Show 11 quoted lines
> Aliases should not hide the commands available elsewhere, and the  
> actual
> execution codepath around ll.480-490 in git.c avoids getting fooled by
> misconfigured aliases, but you do not protect yourself from that  
> kind of
> misconfiguration in this patch.  You can have both "git-foo" command  
> on
> your private $PATH and alias.foo in your configuration, and they  
> will have
> the same levenshtein score.  I suspect this will cause the same "foo"
> suggested twice when the user types "git fo" from the command line.
Yes, I didn't think of that.
> Here is a suggested fix-up on top of your patch to address these  
> issues.
Looks good. Do you want me to resend the patch or will you squash it?
- Pieter
Previous: Junio C Hamano
Message 3 of 3 in “git wrapper: also uses aliases to suggest mistyped commands”
  1. git wrapper: also uses aliases to suggest mistyped commandsPieter de Bie, Sep 10, 2008
  2. Junio C HamanoSep 10, 2008
  3. Pieter de BieSep 11, 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.