Skip to content

Commit

Permalink
Merge branch 'mm/levenstein-penalize-deletion-less'
Browse files Browse the repository at this point in the history
"git tags" used to suggest "git stage" which was nonsense; it should
have favored "git tag".  Tweak the cost of deletion to correct it.

By Matthieu Moy
* mm/levenstein-penalize-deletion-less:
  Reduce cost of deletion in levenstein distance (4 -> 3)
  • Loading branch information
gitster committed Jun 1, 2012
2 parents 21e077f + c41494f commit 7a824d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion help.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ const char *help_unknown_cmd(const char *cmd)
}

main_cmds.names[i]->len =
levenshtein(cmd, candidate, 0, 2, 1, 4) + 1;
levenshtein(cmd, candidate, 0, 2, 1, 3) + 1;
}

qsort(main_cmds.names, main_cmds.cnt,
Expand Down

0 comments on commit 7a824d3

Please sign in to comment.