From: Junio C Hamano Date: Thu, 20 Jan 2022 21:58:43 +0000 (-0800) Subject: fetch: help translators by reusing the same message template X-Git-Tag: v2.36.0-rc0~177^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de4eaae63a87ee33baf477ed10e6e97d649084cf;p=thirdparty%2Fgit.git fetch: help translators by reusing the same message template Follow the example set by 12909b6b (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 Helped-by: Glen Choo Signed-off-by: Junio C Hamano --- diff --git a/builtin/fetch.c b/builtin/fetch.c index dc6e637428..5c329f9835 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -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"); } } diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh index 3f3ad24299..b83f3f5ffe 100755 --- a/t/t5702-protocol-v2.sh +++ b/t/t5702-protocol-v2.sh @@ -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 \