Re: bug: unexpected output for "git st" + suggestion

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

 



On Tue, Nov 23, 2010 at 1:23 PM, Tarek Ziadé <ziade.tarek@xxxxxxxxx> wrote:
> Hello,
>
> I am new to Git and I tried to run "git st"
>
> I have found one small bug: "status" is not listed in the help screen
> Git displays in that case.
>
> $ git st
> git: 'st' is not a git command. See 'git --help'.
>
> Did you mean one of these?
>        reset
>        stage
>        stash
>

This isn't strictly speaking a bug. Git uses Levenshtein distance
(http://en.wikipedia.org/wiki/Levenshtein_distance) to figure out what
to suggest. If any command has a sLevenshtein distance of less than 6
(given our coefficients), then all commands with that distance is
suggested. But perhaps we should do something different

But perhaps we could do better. We have some commands that are
considered more "important", ie the ones listed when doing "git help"
without "--all". "status" is one of these. Perhaps these commands
should always be included if they are below the Levenshtein distance
threshold or something?
--
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]