Skip to content

Commit 12909b6

Browse files
jnavilagitster
authored andcommitted
i18n: turn "options are incompatible" 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 c488182 commit 12909b6

31 files changed

+64
-64
lines changed

apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ int check_apply_state(struct apply_state *state, int force_apply)
133133
int is_not_gitdir = !startup_info->have_repository;
134134

135135
if (state->apply_with_reject && state->threeway)
136-
return error(_("--reject and --3way cannot be used together."));
136+
return error(_("options '%s' and '%s' cannot be used together"), "--reject", "--3way");
137137
if (state->threeway) {
138138
if (is_not_gitdir)
139139
return error(_("--3way outside a repository"));

archive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ static int parse_archive_args(int argc, const char **argv,
581581
if (output)
582582
die(_("Unexpected option --output"));
583583
if (is_remote && args->extra_files.nr)
584-
die(_("Options --add-file and --remote cannot be used together"));
584+
die(_("options '%s' and '%s' cannot be used together"), "--add-file", "--remote");
585585

586586
if (!base)
587587
base = "";

builtin/add.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,9 @@ int cmd_add(int argc, const char **argv, const char *prefix)
507507
add_interactive = 1;
508508
if (add_interactive) {
509509
if (show_only)
510-
die(_("--dry-run is incompatible with --interactive/--patch"));
510+
die(_("options '%s' and '%s' cannot be used together"), "--dry-run", "--interactive/--patch");
511511
if (pathspec_from_file)
512-
die(_("--pathspec-from-file is incompatible with --interactive/--patch"));
512+
die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--interactive/--patch");
513513
exit(interactive_add(argv + 1, prefix, patch_interactive));
514514
}
515515
if (legacy_stash_p) {
@@ -526,7 +526,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
526526

527527
if (edit_interactive) {
528528
if (pathspec_from_file)
529-
die(_("--pathspec-from-file is incompatible with --edit"));
529+
die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--edit");
530530
return(edit_patch(argc, argv, prefix));
531531
}
532532
argc--;
@@ -538,7 +538,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
538538
addremove = 0; /* "-u" was given but not "-A" */
539539

540540
if (addremove && take_worktree_changes)
541-
die(_("-A and -u are mutually incompatible"));
541+
die(_("options '%s' and '%s' cannot be used together"), "-A", "-u");
542542

543543
if (!show_only && ignore_missing)
544544
die(_("Option --ignore-missing can only be used together with --dry-run"));

builtin/branch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
722722
finalize_colopts(&colopts, -1);
723723
if (filter.verbose) {
724724
if (explicitly_enable_column(colopts))
725-
die(_("--column and --verbose are incompatible"));
725+
die(_("options '%s' and '%s' cannot be used together"), "--column", "--verbose");
726726
colopts = 0;
727727
}
728728

builtin/checkout.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,10 @@ static int checkout_paths(const struct checkout_opts *opts,
464464
die(_("'%s' cannot be used with updating paths"), "--detach");
465465

466466
if (opts->merge && opts->patch_mode)
467-
die(_("'%s' cannot be used with %s"), "--merge", "--patch");
467+
die(_("options '%s' and '%s' cannot be used together"), "--merge", "--patch");
468468

469469
if (opts->ignore_unmerged && opts->merge)
470-
die(_("'%s' cannot be used with %s"),
470+
die(_("options '%s' and '%s' cannot be used together"),
471471
opts->ignore_unmerged_opt, "-m");
472472

473473
if (opts->new_branch)
@@ -1749,10 +1749,10 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
17491749
die(_("--pathspec-from-file is incompatible with pathspec arguments"));
17501750

17511751
if (opts->force_detach)
1752-
die(_("--pathspec-from-file is incompatible with --detach"));
1752+
die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--detach");
17531753

17541754
if (opts->patch_mode)
1755-
die(_("--pathspec-from-file is incompatible with --patch"));
1755+
die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--patch");
17561756

17571757
parse_pathspec_file(&opts->pathspec, 0,
17581758
0,

builtin/clone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
903903
die(_("--bare and --origin %s options are incompatible."),
904904
option_origin);
905905
if (real_git_dir)
906-
die(_("--bare and --separate-git-dir are incompatible."));
906+
die(_("options '%s' and '%s' cannot be used together"), "--bare", "--separate-git-dir");
907907
option_no_checkout = 1;
908908
}
909909

builtin/commit.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,10 @@ static const char *prepare_index(const char **argv, const char *prefix,
355355

356356
if (pathspec_from_file) {
357357
if (interactive)
358-
die(_("--pathspec-from-file is incompatible with --interactive/--patch"));
358+
die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--interactive/--patch");
359359

360360
if (all)
361-
die(_("--pathspec-from-file with -a does not make sense"));
361+
die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "-a");
362362

363363
if (pathspec.nr)
364364
die(_("--pathspec-from-file is incompatible with pathspec arguments"));
@@ -1193,7 +1193,7 @@ static void finalize_deferred_config(struct wt_status *s)
11931193
status_format == STATUS_FORMAT_UNSPECIFIED)
11941194
status_format = STATUS_FORMAT_PORCELAIN;
11951195
else if (status_format == STATUS_FORMAT_LONG)
1196-
die(_("--long and -z are incompatible"));
1196+
die(_("options '%s' and '%s' cannot be used together"), "--long", "-z");
11971197
}
11981198

11991199
if (use_deferred_config && status_format == STATUS_FORMAT_UNSPECIFIED)

builtin/describe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
590590
save_commit_buffer = 0;
591591

592592
if (longformat && abbrev == 0)
593-
die(_("--long is incompatible with --abbrev=0"));
593+
die(_("options '%s' and '%s' cannot be used together"), "--long", "--abbrev=0");
594594

595595
if (contains) {
596596
struct string_list_item *item;

builtin/difftool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
730730
setenv(GIT_DIR_ENVIRONMENT, absolute_path(get_git_dir()), 1);
731731
setenv(GIT_WORK_TREE_ENVIRONMENT, absolute_path(get_git_work_tree()), 1);
732732
} else if (dir_diff)
733-
die(_("--dir-diff is incompatible with --no-index"));
733+
die(_("options '%s' and '%s' cannot be used together"), "--dir-diff", "--no-index");
734734

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

builtin/fast-export.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
12691269
printf("feature done\n");
12701270

12711271
if (import_filename && import_filename_if_exists)
1272-
die(_("Cannot pass both --import-marks and --import-marks-if-exists"));
1272+
die(_("options '%s' and '%s' cannot be used together"), "--import-marks", "--import-marks-if-exists");
12731273
if (import_filename)
12741274
import_marks(import_filename, 0);
12751275
else if (import_filename_if_exists)

0 commit comments

Comments
 (0)