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 <worldhello.net@gmail.com> Helped-by: Glen Choo <chooglen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jan 20, 2022 at 13:58 UTC de4eaae63a87ee33baf477ed10e6e97d649084cf
2 files changed +3 -2
builtin/fetch.c
+2 -1
@@ -2014,7 +2014,8 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
2014 break;
2015
2016 default:
2017 - die(_("--negotiate-only and --recurse-submodules cannot be used together"));
2017 + die(_("options '%s' and '%s' cannot be used together"),
2018 + "--negotiate-only", "--recurse-submodules");
2019 }
2020 }
2021
t/t5702-protocol-v2.sh
+1 -1
@@ -630,7 +630,7 @@ test_expect_success 'usage: --negotiate-only without --negotiation-tip' '
630
631 test_expect_success 'usage: --negotiate-only with --recurse-submodules' '
632 cat >err.expect <<-\EOF &&
633 - fatal: --negotiate-only and --recurse-submodules cannot be used together
633 + fatal: options '\''--negotiate-only'\'' and '\''--recurse-submodules'\'' cannot be used together
634 EOF
635
636 test_must_fail git -c protocol.version=2 -C client fetch \