Skip to content

Commit

Permalink
fetch: help translators by reusing the same message template
Browse files Browse the repository at this point in the history
Follow the example set by 12909b6 (i18n: turn "options are
incompatible" into "cannot be used together", 2022-01-05) and use
the same message string to reduce the need for translation.

Reported-by: Jiang Xin <worldhello.net@gmail.com>
Helped-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
gitster committed Jan 20, 2022
1 parent 386c076 commit de4eaae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion builtin/fetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,8 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
break;

default:
die(_("--negotiate-only and --recurse-submodules cannot be used together"));
die(_("options '%s' and '%s' cannot be used together"),
"--negotiate-only", "--recurse-submodules");
}
}

Expand Down
2 changes: 1 addition & 1 deletion t/t5702-protocol-v2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ test_expect_success 'usage: --negotiate-only without --negotiation-tip' '

test_expect_success 'usage: --negotiate-only with --recurse-submodules' '
cat >err.expect <<-\EOF &&
fatal: --negotiate-only and --recurse-submodules cannot be used together
fatal: options '\''--negotiate-only'\'' and '\''--recurse-submodules'\'' cannot be used together
EOF
test_must_fail git -c protocol.version=2 -C client fetch \
Expand Down

0 comments on commit de4eaae

Please sign in to comment.