From 7854bf49604484a7276b96d312b9daf7d15c7b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sun, 26 Nov 2023 12:57:43 +0100 Subject: i18n: factorize even more 'incompatible options' messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Continue the work of 12909b6b8a (i18n: turn "options are incompatible" into "cannot be used together", 2022-01-05) and a699367bb8 (i18n: factorize more 'incompatible options' messages, 2022-01-31) to use the same parameterized error message for reporting incompatible command line options. This reduces the number of strings to translate and makes the UI slightly more consistent. Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano --- builtin/clone.c | 4 +++- builtin/merge-tree.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'builtin') diff --git a/builtin/clone.c b/builtin/clone.c index c6357af949..45a5070268 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -965,7 +965,9 @@ int cmd_clone(int argc, const char **argv, const char *prefix) } if (bundle_uri && deepen) - die(_("--bundle-uri is incompatible with --depth, --shallow-since, and --shallow-exclude")); + die(_("options '%s' and '%s' cannot be used together"), + "--bundle-uri", + "--depth/--shallow-since/--shallow-exclude"); repo_name = argv[0]; diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index a35e0452d6..a4aa6013c5 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -577,7 +577,8 @@ int cmd_merge_tree(int argc, const char **argv, const char *prefix) if (o.mode == MODE_TRIVIAL) die(_("--trivial-merge is incompatible with all other options")); if (merge_base) - die(_("--merge-base is incompatible with --stdin")); + die(_("options '%s' and '%s' cannot be used together"), + "--merge-base", "--stdin"); line_termination = '\0'; while (strbuf_getline_lf(&buf, stdin) != EOF) { struct strbuf **split; -- cgit v1.2.3