Re: [PATCH v3 6/8] parseopt: autocorrect mistyped subcommands
On Tue, Mar 10, 2026 at 01:16:39PM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> > + unsigned int threshold = len < 3 ? 1 : len < 6 ? 3 : 6;
> > +
> > + return dist < threshold;
> > +}
>
> There should be some explanation on the reason why this is very
> different from SIMILAR_ENOUGH used in help.c for main commands,
> especially given that the levenshtein() call here uses identical
> weight parameters (0,2,1,3) as used by the call there.
Will add a comment to explain it.
--
Jiamu Sun <39@barroit.sh>
<sunjiamu@outlook.com>