Skip to content

Commit 0fc8ed1

Browse files
kashavgitster
authored andcommitted
help: make auto-correction prompt more consistent
There are three callsites of git_prompt() helper function that ask a "yes/no" question to the end user, but one of them in help.c that asks if the suggested auto-correction is OK, which is given when the user makes a possible typo in a Git subcommand name, is formatted differently from the others. Update the format string to make the prompt string look more consistent. Signed-off-by: Kashav Madan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e9d7761 commit 0fc8ed1

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
@@ -643,7 +643,7 @@ const char *help_unknown_cmd(const char *cmd)
643643
else if (autocorrect == AUTOCORRECT_PROMPT) {
644644
char *answer;
645645
struct strbuf msg = STRBUF_INIT;
646-
strbuf_addf(&msg, _("Run '%s' instead? (y/N)"), assumed);
646+
strbuf_addf(&msg, _("Run '%s' instead [y/N]? "), assumed);
647647
answer = git_prompt(msg.buf, PROMPT_ECHO);
648648
strbuf_release(&msg);
649649
if (!(starts_with(answer, "y") ||

0 commit comments

Comments
 (0)