If git detects typos and can identify exactly one valid command similar
to the error, git will try to suggest the correct command or even
run the suggestion automatically. Possible config values are:
- - 0, "false", "off", "no": show the suggested command (default).
+ - 0, "false", "off", "no", "show": show the suggested command (default).
- 1, "true", "on", "yes", "immediate": run the suggested command
immediately.
- positive number > 1: run the suggested command after specified
return AUTOCORRECT_NEVER;
if (!strcmp(value, "immediate"))
return AUTOCORRECT_IMMEDIATELY;
+ if (!strcmp(value, "show"))
+ return AUTOCORRECT_SHOW;
return 0;
}
test_cmp expect actual
'
-for show in false no off 0
+for show in false no off 0 show
do
test_expect_success 'autocorrect showing candidates' '
git config help.autocorrect $show &&