Re: [PATCH v3 6/8] parseopt: autocorrect mistyped subcommands
- From
- Jiamu Sun <39@barroit.sh>
- Date
- Mar 12, 2026, 04:53 UTC
- Message-ID
- <SY0P300MB08019AC7A54CBB4031646F70CE44A@SY0P300MB0801.AUSP300.PROD.OUTLOOK.COM>
- In-Reply-To
- <xmqq4imlkc04.fsf@gitster.g>
On Wed, Mar 11, 2026 at 07:38:51PM -0700, Junio C Hamano wrote:
> I don't, but others who have their hand in the code may. "git > blame" or "git shortlog --no-merges" may be good tools to use to > find out who they are.
Thanks for the pointer!
+Cc Erik Faye-Lund <kusmabite@gmail.com>
The reason I asked is that I'm documenting similar_enough() for subcommand autocorrection in this series. It allows "lis" to correct to "list", but avoids "ad" to "add".
I noticed that the command autocorrection ignores prefix-matched strings entirely (e.g., not correcting "commi" to "commit", as introduced in commit 6612b9e471a3). I wanted to understand the rationale behind this to see if subcommands should align with that design.
Thanks.
--
Jiamu Sun <39@barroit.sh>
<sunjiamu@outlook.com>