Skip to content

Commit c488182

Browse files
jnavilagitster
authored andcommitted
i18n: refactor "%s, %s and %s are mutually exclusive"
Use placeholders for constant tokens. The strings are turned into "cannot be used together" Signed-off-by: Jean-Noël Avila <[email protected]> Reviewed-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 43ea635 commit c488182

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

builtin/difftool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
733733
die(_("--dir-diff is incompatible with --no-index"));
734734

735735
if (use_gui_tool + !!difftool_cmd + !!extcmd > 1)
736-
die(_("--gui, --tool and --extcmd are mutually exclusive"));
736+
die(_("options '%s', '%s', and '%s' cannot be used together"), "--gui", "--tool", "--extcmd");
737737

738738
if (use_gui_tool)
739739
setenv("GIT_MERGETOOL_GUI", "true", 1);

builtin/log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1979,7 +1979,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
19791979
load_display_notes(&rev.notes_opt);
19801980

19811981
if (use_stdout + rev.diffopt.close_file + !!output_directory > 1)
1982-
die(_("--stdout, --output, and --output-directory are mutually exclusive"));
1982+
die(_("options '%s', '%s', and '%s' cannot be used together"), "--stdout", "--output", "--output-directory");
19831983

19841984
if (use_stdout) {
19851985
setup_pager();

builtin/worktree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ static int add(int ac, const char **av, const char *prefix)
503503
opts.checkout = 1;
504504
ac = parse_options(ac, av, prefix, options, worktree_usage, 0);
505505
if (!!opts.detach + !!new_branch + !!new_branch_force > 1)
506-
die(_("-b, -B, and --detach are mutually exclusive"));
506+
die(_("options '%s', '%s', and '%s' cannot be used together"), "-b", "-B", "--detach");
507507
if (lock_reason && !keep_locked)
508508
die(_("--reason requires --lock"));
509509
if (lock_reason)

diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4642,7 +4642,7 @@ void diff_setup_done(struct diff_options *options)
46424642
die(_("--name-only, --name-status, --check and -s are mutually exclusive"));
46434643

46444644
if (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK))
4645-
die(_("-G, -S and --find-object are mutually exclusive"));
4645+
die(_("options '%s', '%s', and '%s' cannot be used together"), "-G", "-S", "--find-object");
46464646

46474647
if (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_G_REGEX_MASK))
46484648
die(_("-G and --pickaxe-regex are mutually exclusive, use --pickaxe-regex with -S"));

t/t4209-log-pickaxe.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ test_expect_success 'usage' '
6363
test_i18ngrep "switch.*requires a value" err &&
6464
6565
test_expect_code 128 git log -Gregex -Sstring 2>err &&
66-
grep "mutually exclusive" err &&
66+
grep "cannot be used together" err &&
6767
6868
test_expect_code 128 git log -Gregex --find-object=HEAD 2>err &&
69-
grep "mutually exclusive" err &&
69+
grep "cannot be used together" err &&
7070
7171
test_expect_code 128 git log -Sstring --find-object=HEAD 2>err &&
72-
grep "mutually exclusive" err &&
72+
grep "cannot be used together" err &&
7373
7474
test_expect_code 128 git log --pickaxe-all --find-object=HEAD 2>err &&
7575
grep "mutually exclusive" err

0 commit comments

Comments
 (0)