summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Jean-Noël Avila <jn.avila@free.fr>2022-01-05 20:02:14 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-01-05 13:29:23 -0800
commit43ea635c35371b22a7a2010398d47040c5b95adc (patch)
tree39fdf40eba05aba61c7bf2fcfae638bdd66abc09 /builtin
parentThe fifth batch (diff)
downloadtgif-43ea635c35371b22a7a2010398d47040c5b95adc.tar.xz
i18n: refactor "foo and bar are mutually exclusive"
Use static strings for constant parts of the sentences. They are all turned into "cannot be used together". Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Reviewed-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/checkout.c2
-rw-r--r--builtin/diff-tree.c2
-rw-r--r--builtin/fetch.c4
-rw-r--r--builtin/init-db.c2
-rw-r--r--builtin/log.c4
-rw-r--r--builtin/submodule--helper.c4
-rw-r--r--builtin/worktree.c2
7 files changed, 10 insertions, 10 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 72beeb49aa..79014e1cb6 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -1639,7 +1639,7 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
cb_option, toupper(cb_option));
if (opts->overlay_mode == 1 && opts->patch_mode)
- die(_("-p and --overlay are mutually exclusive"));
+ die(_("options '%s' and '%s' cannot be used together"), "-p", "--overlay");
if (opts->checkout_index >= 0 || opts->checkout_worktree >= 0) {
if (opts->checkout_index < 0)
diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c
index f33d30d57b..0e0ac1f167 100644
--- a/builtin/diff-tree.c
+++ b/builtin/diff-tree.c
@@ -152,7 +152,7 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
}
if (read_stdin && merge_base)
- die(_("--stdin and --merge-base are mutually exclusive"));
+ die(_("options '%s' and '%s' cannot be used together"), "--stdin", "--merge-base");
if (merge_base && opt->pending.nr != 2)
die(_("--merge-base only works with two commits"));
diff --git a/builtin/fetch.c b/builtin/fetch.c
index f1fe73a3e0..2c584c8581 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -2028,12 +2028,12 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
if (deepen_relative < 0)
die(_("negative depth in --deepen is not supported"));
if (depth)
- die(_("--deepen and --depth are mutually exclusive"));
+ die(_("options '%s' and '%s' cannot be used together"), "--deepen", "--depth");
depth = xstrfmt("%d", deepen_relative);
}
if (unshallow) {
if (depth)
- die(_("--depth and --unshallow cannot be used together"));
+ die(_("options '%s' and '%s' cannot be used together"), "--depth", "--unshallow");
else if (!is_repository_shallow(the_repository))
die(_("--unshallow on a complete repository does not make sense"));
else
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 2167796ff2..546f9c595e 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -557,7 +557,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, prefix, init_db_options, init_db_usage, 0);
if (real_git_dir && is_bare_repository_cfg == 1)
- die(_("--separate-git-dir and --bare are mutually exclusive"));
+ die(_("options '%s' and '%s' cannot be used together"), "--separate-git-dir", "--bare");
if (real_git_dir && !is_absolute_path(real_git_dir))
real_git_dir = real_pathdup(real_git_dir, 1);
diff --git a/builtin/log.c b/builtin/log.c
index 93ace0dde7..fad93ad2fc 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1943,9 +1943,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
numbered = 0;
if (numbered && keep_subject)
- die(_("-n and -k are mutually exclusive"));
+ die(_("options '%s' and '%s' cannot be used together"), "-n", "-k");
if (keep_subject && subject_prefix)
- die(_("--subject-prefix/--rfc and -k are mutually exclusive"));
+ die(_("options '%s' and '%s' cannot be used together"), "--subject-prefix/--rfc", "-k");
rev.preserve_subject = keep_subject;
argc = setup_revisions(argc, argv, &rev, &s_r_opt);
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 9b25a508e6..c5d3fc3817 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1313,7 +1313,7 @@ static int module_summary(int argc, const char **argv, const char *prefix)
if (files) {
if (cached)
- die(_("--cached and --files are mutually exclusive"));
+ die(_("options '%s' and '%s' cannot be used together"), "--cached", "--files");
diff_cmd = DIFF_FILES;
}
@@ -2972,7 +2972,7 @@ static int module_set_branch(int argc, const char **argv, const char *prefix)
die(_("--branch or --default required"));
if (opt_branch && opt_default)
- die(_("--branch and --default are mutually exclusive"));
+ die(_("options '%s' and '%s' cannot be used together"), "--branch", "--default");
if (argc != 1 || !(path = argv[0]))
usage_with_options(usage, options);
diff --git a/builtin/worktree.c b/builtin/worktree.c
index a396cfdc64..9a52048576 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -699,7 +699,7 @@ static int list(int ac, const char **av, const char *prefix)
if (ac)
usage_with_options(worktree_usage, options);
else if (verbose && porcelain)
- die(_("--verbose and --porcelain are mutually exclusive"));
+ die(_("options '%s' and '%s' cannot be used together"), "--verbose", "--porcelain");
else {
struct worktree **worktrees = get_worktrees();
int path_maxlen = 0, abbrev = DEFAULT_ABBREV, i;