From: Erik Faye-Lund Date: Tue, 23 Nov 2010 13:22:43 GMT Subject: Re: bug: unexpected output for "git st" + suggestion Message-ID: In-Reply-To: On Tue, Nov 23, 2010 at 1:23 PM, Tarek Ziadé 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?