Re: [PATCH updated] git wrapper: DWIM mistyped commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/8/28 Alex Riesen <raa.lkml@xxxxxxxxx>:
> From: Johannes Schindelin <Johannes.Schindelin@xxxxxx>
>
> 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.

I merged the branch in pu into next, which I think should work, but I get
these segfaults for some commands... I tried running in gdb but even with
-g3 I only get nonsense backtraces, not sure why.

% git puhs
WARNING: You called a Git program named 'puhs', which does not exist.
Continuing under the assumption that you meant 'push'
in 2.0 seconds automatically...
zsh: segmentation fault  git puhs

% git ma
WARNING: You called a Git program named 'ma', which does not exist.
Continuing under the assumption that you meant 'am'
in 2.0 seconds automatically...
Nothing to do.

At this point I thought builtins crashed and scripts were fine, but...
% git ada
WARNING: You called a Git program named 'ada', which does not exist.
Continuing under the assumption that you meant 'add'
in 2.0 seconds automatically...
Nothing specified, nothing added.
Maybe you wanted to say 'git add .'?

However,
% git ada git.c
WARNING: You called a Git program named 'ada', which does not exist.
Continuing under the assumption that you meant 'add'
in 2.0 seconds automatically...
zsh: segmentation fault  git ada git.c

-- 
Mikael Magnusson
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux