]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fetch: help translators by reusing the same message template
authorJunio C Hamano <gitster@pobox.com>
Thu, 20 Jan 2022 21:58:43 +0000 (13:58 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 20 Jan 2022 23:04:53 +0000 (15:04 -0800)
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>
builtin/fetch.c
t/t5702-protocol-v2.sh

index dc6e6374288cd0d45a291988c6924525f9dd5c2a..5c329f98358759a0b9a552d528f1f437d6c0087f 100644 (file)
@@ -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");
                }
        }
 
index 3f3ad24299039d1b33b556df1ca67fe853cab707..b83f3f5ffe62964e150a46fd98bd8d428450377f 100755 (executable)
@@ -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 \