Re: [PATCH] help.autocorrect: do not run a command if the command given is junk
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Dec 14, 2009, 22:04 UTC
- Message-ID
- <alpine.DEB.1.00.0912142303270.4985@pacific.mpi-cbg.de>
- In-Reply-To
- <7vocm1grdb.fsf@alter.siamese.dyndns.org>
Hi,
On Mon, 14 Dec 2009, Junio C Hamano wrote:
Show 7 quoted lines
> I somehow suspect that a good mathematician can come up with a rationale > for 6 after the fact that sounds convincing, along the lines of "the > average length of commands being N, and levenshtein penalties being > <0,2,1,4>, you can insert X mistaken keystroke and/or omit Y mistaken > keystroke per every correct keystroke without exceeding this value 6, > and the percentage X and/or Y represents is not too low to be practical > but low enough to reject false positives".
Being a mathematician, I was tempted to invent such a reasoning in hindsight.
But I decided to be truthful instead, Dscho