1. 22 Feb, 2016 1 commit
  2. 23 Apr, 2009 1 commit
  3. 24 Nov, 2008 2 commits
  4. 31 Aug, 2008 1 commit
    • Johannes Schindelin's avatar
      git wrapper: DWIM mistyped commands · 8af84dad
      Johannes Schindelin authored
      This patch introduces a modified Damerau-Levenshtein algorithm into
      Git's code base, and uses it with the following penalties to show some
      similar commands when an unknown command was encountered:
      
      	swap = 0, insertion = 1, substitution = 2, deletion = 4
      
      A typical output would now look like this:
      
      	$ git sm
      	git: 'sm' is not a git-command. See 'git --help'.
      
      	Did you mean one of these?
      		am
      		rm
      
      The cut-off is at similarity rating 6, which was empirically determined
      to give sensible results.
      
      As a convenience, if there is only one candidate, Git continues under
      the assumption that the user mistyped it.  Example:
      
      	$ git reabse
      	WARNING: You called a Git program named 'reabse', which does
      	not exist.
      	Continuing under the assumption that you meant 'rebase'
      	[...]
      Signed-off-by: Johannes Schindelin's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
      Signed-off-by: 's avatarAlex Riesen <raa.lkml@gmail.com>
      Signed-off-by: 's avatarJunio C Hamano <gitster@pobox.com>
      8af84dad