From: "Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "Jeff King" <peff@peff.net>, "Johannes Sixt" <j6t@kdbg.org>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Jean-Noël Avila" <jn.avila@free.fr>,
"Jean-Noël Avila" <jn.avila@free.fr>
Subject: [PATCH v3 02/11] i18n: refactor "%s, %s and %s are mutually exclusive"
Date: Wed, 29 Dec 2021 18:54:58 +0000 [thread overview]
Message-ID: <4accf1629e55ae621053f27994ebc4eb59d6f0ff.1640804107.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1088.v3.git.1640804107.gitgitgadget@gmail.com>
From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <jn.avila@free.fr>
Use placeholders for constant tokens. The strings are turned into
"cannot be used together"
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
---
builtin/difftool.c | 2 +-
builtin/log.c | 2 +-
builtin/worktree.c | 2 +-
diff.c | 2 +-
t/t4209-log-pickaxe.sh | 6 +++---
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/builtin/difftool.c b/builtin/difftool.c
index 4ee40fe3a06..c2b049aafc9 100644
--- a/builtin/difftool.c
+++ b/builtin/difftool.c
@@ -733,7 +733,7 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
die(_("--dir-diff is incompatible with --no-index"));
if (use_gui_tool + !!difftool_cmd + !!extcmd > 1)
- die(_("--gui, --tool and --extcmd are mutually exclusive"));
+ die(_("options '%s', '%s' and '%s' cannot be used together"), "--gui", "--tool", "--extcmd");
if (use_gui_tool)
setenv("GIT_MERGETOOL_GUI", "true", 1);
diff --git a/builtin/log.c b/builtin/log.c
index fad93ad2fc1..705d58110b0 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1979,7 +1979,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
load_display_notes(&rev.notes_opt);
if (use_stdout + rev.diffopt.close_file + !!output_directory > 1)
- die(_("--stdout, --output, and --output-directory are mutually exclusive"));
+ die(_("options '%s', '%s' and '%s' cannot be used together"), "--stdout", "--output", "--output-directory");
if (use_stdout) {
setup_pager();
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 9a520485769..b5ef19b2dda 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -503,7 +503,7 @@ static int add(int ac, const char **av, const char *prefix)
opts.checkout = 1;
ac = parse_options(ac, av, prefix, options, worktree_usage, 0);
if (!!opts.detach + !!new_branch + !!new_branch_force > 1)
- die(_("-b, -B, and --detach are mutually exclusive"));
+ die(_("options '%s', '%s' and '%s' cannot be used together"), "-b", "-B", "--detach");
if (lock_reason && !keep_locked)
die(_("--reason requires --lock"));
if (lock_reason)
diff --git a/diff.c b/diff.c
index 41076857428..8de1c49763c 100644
--- a/diff.c
+++ b/diff.c
@@ -4642,7 +4642,7 @@ void diff_setup_done(struct diff_options *options)
die(_("--name-only, --name-status, --check and -s are mutually exclusive"));
if (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK))
- die(_("-G, -S and --find-object are mutually exclusive"));
+ die(_("options '%s', '%s' and '%s' cannot be used together"), "-G", "-S", "--find-object");
if (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_G_REGEX_MASK))
die(_("-G and --pickaxe-regex are mutually exclusive, use --pickaxe-regex with -S"));
diff --git a/t/t4209-log-pickaxe.sh b/t/t4209-log-pickaxe.sh
index 75795d0b492..4f820f8597d 100755
--- a/t/t4209-log-pickaxe.sh
+++ b/t/t4209-log-pickaxe.sh
@@ -63,13 +63,13 @@ test_expect_success 'usage' '
test_i18ngrep "switch.*requires a value" err &&
test_expect_code 128 git log -Gregex -Sstring 2>err &&
- grep "mutually exclusive" err &&
+ grep "cannot be used together" err &&
test_expect_code 128 git log -Gregex --find-object=HEAD 2>err &&
- grep "mutually exclusive" err &&
+ grep "cannot be used together" err &&
test_expect_code 128 git log -Sstring --find-object=HEAD 2>err &&
- grep "mutually exclusive" err &&
+ grep "cannot be used together" err &&
test_expect_code 128 git log --pickaxe-all --find-object=HEAD 2>err &&
grep "mutually exclusive" err
--
gitgitgadget
next prev parent reply other threads:[~2021-12-29 18:55 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 7:01 [PATCH 00/10] Factorization of messages with similar meaning Jean-Noël Avila via GitGitGadget
2021-12-03 7:01 ` [PATCH 01/10] i18n: refactor "foo and bar are mutually exclusive" Jean-Noël Avila via GitGitGadget
2021-12-07 18:07 ` Ævar Arnfjörð Bjarmason
2021-12-08 18:13 ` Jean-Noël AVILA
2021-12-03 7:01 ` [PATCH 02/10] i18n: refactor "%s, %s and %s " Jean-Noël Avila via GitGitGadget
2021-12-03 7:01 ` [PATCH 03/10] i18n: turn "options are incompatible" into "are " Jean-Noël Avila via GitGitGadget
2021-12-03 7:01 ` [PATCH 04/10] i18n: standardize "cannot open" and "cannot read" Jean-Noël Avila via GitGitGadget
2021-12-07 18:09 ` Ævar Arnfjörð Bjarmason
2021-12-03 7:01 ` [PATCH 05/10] i18n: tag.c factorize i18n strings Jean-Noël Avila via GitGitGadget
2021-12-07 18:10 ` Ævar Arnfjörð Bjarmason
2021-12-03 7:01 ` [PATCH 06/10] i18n: factorize "--foo requires --bar" and the like Jean-Noël Avila via GitGitGadget
2021-12-03 7:01 ` [PATCH 07/10] i18n: factorize "no directory given for --foo" Jean-Noël Avila via GitGitGadget
2021-12-03 7:01 ` [PATCH 08/10] i18n: refactor "unrecognized %(foo) argument" strings Jean-Noël Avila via GitGitGadget
2021-12-07 18:15 ` Ævar Arnfjörð Bjarmason
2021-12-03 7:01 ` [PATCH 09/10] i18n: factorize "--foo outside a repository" Jean-Noël Avila via GitGitGadget
2021-12-03 7:01 ` [PATCH 10/10] i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" Jean-Noël Avila via GitGitGadget
2021-12-03 21:55 ` [PATCH 00/10] Factorization of messages with similar meaning Jeff King
2021-12-03 23:39 ` Johannes Sixt
2021-12-05 7:31 ` Junio C Hamano
2021-12-05 17:25 ` Jean-Noël AVILA
2021-12-05 19:50 ` Johannes Sixt
2021-12-06 19:18 ` Junio C Hamano
2021-12-05 19:30 ` Junio C Hamano
2021-12-27 23:23 ` [PATCH v2 00/11] " Jean-Noël Avila via GitGitGadget
2021-12-27 23:23 ` [PATCH v2 01/11] i18n: refactor "foo and bar are mutually exclusive" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23 ` [PATCH v2 02/11] i18n: refactor "%s, %s and %s " Jean-Noël Avila via GitGitGadget
2021-12-27 23:23 ` [PATCH v2 03/11] i18n: turn "options are incompatible" into "cannot be used together" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23 ` [PATCH v2 04/11] i18n: standardize "cannot open" and "cannot read" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23 ` [PATCH v2 05/11] i18n: tag.c factorize i18n strings Jean-Noël Avila via GitGitGadget
2021-12-27 23:42 ` Junio C Hamano
2021-12-27 23:45 ` Ævar Arnfjörð Bjarmason
2021-12-28 0:16 ` Junio C Hamano
2021-12-29 14:05 ` Jean-Noël AVILA
2021-12-27 23:23 ` [PATCH v2 06/11] i18n: factorize "--foo requires --bar" and the like Jean-Noël Avila via GitGitGadget
2021-12-28 7:01 ` Johannes Sixt
2021-12-29 14:02 ` Jean-Noël AVILA
2021-12-27 23:23 ` [PATCH v2 07/11] i18n: factorize "no directory given for --foo" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23 ` [PATCH v2 08/11] i18n: refactor "unrecognized %(foo) argument" strings Jean-Noël Avila via GitGitGadget
2021-12-27 23:23 ` [PATCH v2 09/11] i18n: factorize "--foo outside a repository" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23 ` [PATCH v2 10/11] i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" Jean-Noël Avila via GitGitGadget
2021-12-27 23:23 ` [PATCH v2 11/11] i18n: turn even more messages into "cannot be used together" ones Jean-Noël Avila via GitGitGadget
2021-12-28 7:33 ` Johannes Sixt
2021-12-29 15:49 ` Jean-Noël AVILA
2021-12-29 18:54 ` [PATCH v3 00/11] Factorization of messages with similar meaning Jean-Noël Avila via GitGitGadget
2021-12-29 18:54 ` [PATCH v3 01/11] i18n: refactor "foo and bar are mutually exclusive" Jean-Noël Avila via GitGitGadget
2021-12-29 18:54 ` Jean-Noël Avila via GitGitGadget [this message]
2021-12-30 22:26 ` [PATCH v3 02/11] i18n: refactor "%s, %s and %s " Junio C Hamano
2021-12-31 17:05 ` Jean-Noël AVILA
2021-12-29 18:54 ` [PATCH v3 03/11] i18n: turn "options are incompatible" into "cannot be used together" Jean-Noël Avila via GitGitGadget
2021-12-29 19:36 ` Johannes Sixt
2021-12-30 16:52 ` Jean-Noël AVILA
2021-12-30 22:36 ` Junio C Hamano
2021-12-29 18:55 ` [PATCH v3 04/11] i18n: standardize "cannot open" and "cannot read" Jean-Noël Avila via GitGitGadget
2021-12-29 18:55 ` [PATCH v3 05/11] i18n: tag.c factorize i18n strings Jean-Noël Avila via GitGitGadget
2022-01-01 14:14 ` René Scharfe
2021-12-29 18:55 ` [PATCH v3 06/11] i18n: factorize "--foo requires --bar" and the like Jean-Noël Avila via GitGitGadget
2021-12-29 18:55 ` [PATCH v3 07/11] i18n: factorize "no directory given for --foo" Jean-Noël Avila via GitGitGadget
2021-12-30 22:36 ` Junio C Hamano
2021-12-29 18:55 ` [PATCH v3 08/11] i18n: refactor "unrecognized %(foo) argument" strings Jean-Noël Avila via GitGitGadget
2021-12-29 18:55 ` [PATCH v3 09/11] i18n: factorize "--foo outside a repository" Jean-Noël Avila via GitGitGadget
2021-12-29 18:55 ` [PATCH v3 10/11] i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" Jean-Noël Avila via GitGitGadget
2021-12-29 18:55 ` [PATCH v3 11/11] i18n: turn even more messages into "cannot be used together" ones Jean-Noël Avila via GitGitGadget
2021-12-30 22:36 ` Junio C Hamano
2021-12-31 17:16 ` Jean-Noël AVILA
2022-01-03 21:51 ` Junio C Hamano
2022-01-02 17:15 ` [PATCH v4 00/11] Factorization of messages with similar meaning Jean-Noël Avila via GitGitGadget
2022-01-02 17:15 ` [PATCH v4 01/11] i18n: refactor "foo and bar are mutually exclusive" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15 ` [PATCH v4 02/11] i18n: refactor "%s, %s and %s " Jean-Noël Avila via GitGitGadget
2022-01-03 15:44 ` Johannes Sixt
2022-01-02 17:15 ` [PATCH v4 03/11] i18n: turn "options are incompatible" into "cannot be used together" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15 ` [PATCH v4 04/11] i18n: standardize "cannot open" and "cannot read" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15 ` [PATCH v4 05/11] i18n: tag.c factorize i18n strings Jean-Noël Avila via GitGitGadget
2022-01-02 17:37 ` René Scharfe
2022-01-02 20:29 ` Jean-Noël AVILA
2022-01-02 17:15 ` [PATCH v4 06/11] i18n: factorize "--foo requires --bar" and the like Jean-Noël Avila via GitGitGadget
2022-01-02 17:15 ` [PATCH v4 07/11] i18n: factorize "no directory given for --foo" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15 ` [PATCH v4 08/11] i18n: refactor "unrecognized %(foo) argument" strings Jean-Noël Avila via GitGitGadget
2022-01-02 17:15 ` [PATCH v4 09/11] i18n: factorize "--foo outside a repository" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15 ` [PATCH v4 10/11] i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" Jean-Noël Avila via GitGitGadget
2022-01-02 17:15 ` [PATCH v4 11/11] i18n: turn even more messages into "cannot be used together" ones Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 00/11] Factorization of messages with similar meaning Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 01/11] i18n: refactor "foo and bar are mutually exclusive" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 02/11] i18n: refactor "%s, %s and %s " Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 03/11] i18n: turn "options are incompatible" into "cannot be used together" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 04/11] i18n: standardize "cannot open" and "cannot read" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 05/11] i18n: tag.c factorize i18n strings Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 06/11] i18n: factorize "--foo requires --bar" and the like Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 07/11] i18n: factorize "no directory given for --foo" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 08/11] i18n: refactor "unrecognized %(foo) argument" strings Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 09/11] i18n: factorize "--foo outside a repository" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 10/11] i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" Jean-Noël Avila via GitGitGadget
2022-01-05 20:02 ` [PATCH v5 11/11] i18n: turn even more messages into "cannot be used together" ones Jean-Noël Avila via GitGitGadget
2022-01-05 20:58 ` [PATCH v5 00/11] Factorization of messages with similar meaning Johannes Sixt
2022-01-05 21:31 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4accf1629e55ae621053f27994ebc4eb59d6f0ff.1640804107.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=jn.avila@free.fr \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).