Skip to content

Commit 877a7f6

Browse files
schacongitster
authored andcommitted
help: interpret help.autocorrect=1 as "immediate" rather than 0.1s
Many people confusingly set the "help.autocorrect" setting to 1 believing it to be a boolean that turns on the autocorrect feature rather than an integer value of deciseconds wait time. Since it's impossible for a human being to react this quickly, the help message stating that it's waiting for 0.1s before continuing becomes confusingly comical. This patch simply interprets a "1" value as the same as the "immedate" autocorrect setting, which makes it skip the 0.1s and simply say that it's running the command, which is almost certainly what everyone setting it to that value is actually trying to do. Signed-off-by: Scott Chacon <schacon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent a60673e commit 877a7f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

help.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ static int git_unknown_cmd_config(const char *var, const char *value,
568568
return config_error_nonbool(var);
569569
if (!strcmp(value, "never")) {
570570
cfg->autocorrect = AUTOCORRECT_NEVER;
571-
} else if (!strcmp(value, "immediate")) {
571+
} else if (!strcmp(value, "immediate") || !strcmp(value, "1")) {
572572
cfg->autocorrect = AUTOCORRECT_IMMEDIATELY;
573573
} else if (!strcmp(value, "prompt")) {
574574
cfg->autocorrect = AUTOCORRECT_PROMPT;

0 commit comments

Comments
 (0)