On Wed Nov 18, 2020 at 12:16 PM EST, Junio C Hamano wrote: > It is unclear from this description alone why this is needed. The > seller of this change needs to emphasize how this is better than > setting the variable to "0" (do not autocorrect). My guess is that > some users do not even need the suggestion of correct spelling when > they made a typo? This is one reason. Another is that spell checking can be computationally expensive, and take an annoyingly long time on low-end devices. > > @@ -706,10 +725,16 @@ NORETURN void help_unknown_ref(const char *ref, const char *cmd, > > const char *error) > > { > > int i; > > - struct string_list suggested_refs = guess_refs(ref); > > + struct string_list suggested_refs; > > > > fprintf_ln(stderr, _("%s: %s - %s"), cmd, ref, error); > > > > + if (autocorrect == AUTOCORRECT_NEVER) { > > + exit(1); > > + } > > I am not sure how the change in this hunk is justifiable. I think this was caught up in the move from a new config option to changing the meaning of help.autocorrect. > This is a tangent, but it seems to me that help_unknown_ref() is way > under-used and lacks usefulness too much---probably these contribute > to each other. Given that this is under-utilized anyway, and no longer applicable to the essential purpose of the patch, I'm just going to pull this change out of the patch. If this function starts to enjoy broader usage within git, we could revisit a config lever later on. Thanks for the feedback, sending v4 shortly.