]> git.ipfire.org Git - thirdparty/git.git/commitdiff
i18n: turn "options are incompatible" into "cannot be used together"
authorJean-Noël Avila <jn.avila@free.fr>
Wed, 5 Jan 2022 20:02:16 +0000 (20:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Jan 2022 21:29:23 +0000 (13:29 -0800)
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>
31 files changed:
apply.c
archive.c
builtin/add.c
builtin/branch.c
builtin/checkout.c
builtin/clone.c
builtin/commit.c
builtin/describe.c
builtin/difftool.c
builtin/fast-export.c
builtin/index-pack.c
builtin/ls-files.c
builtin/merge.c
builtin/pack-objects.c
builtin/push.c
builtin/rebase.c
builtin/repack.c
builtin/reset.c
builtin/rev-list.c
builtin/show-branch.c
builtin/stash.c
builtin/tag.c
revision.c
t/t2026-checkout-pathspec-file.sh
t/t2072-restore-pathspec-file.sh
t/t3431-rebase-fork-point.sh
t/t3704-add-pathspec-file.sh
t/t3909-stash-pathspec-file.sh
t/t5606-clone-options.sh
t/t7107-reset-pathspec-file.sh
t/t7526-commit-pathspec-file.sh

diff --git a/apply.c b/apply.c
index fed195250b64eea60e34849940c43016c2c3b5fa..cabcdbe425a56a5fc0d222ffbd9bc1ae15074b9f 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -133,7 +133,7 @@ int check_apply_state(struct apply_state *state, int force_apply)
        int is_not_gitdir = !startup_info->have_repository;
 
        if (state->apply_with_reject && state->threeway)
-               return error(_("--reject and --3way cannot be used together."));
+               return error(_("options '%s' and '%s' cannot be used together"), "--reject", "--3way");
        if (state->threeway) {
                if (is_not_gitdir)
                        return error(_("--3way outside a repository"));
index a3bbb091256dd7077e257f20f532d47516e4a960..e85ba169088e10f1a44b68d36f87763995be1a9a 100644 (file)
--- a/archive.c
+++ b/archive.c
@@ -581,7 +581,7 @@ static int parse_archive_args(int argc, const char **argv,
        if (output)
                die(_("Unexpected option --output"));
        if (is_remote && args->extra_files.nr)
-               die(_("Options --add-file and --remote cannot be used together"));
+               die(_("options '%s' and '%s' cannot be used together"), "--add-file", "--remote");
 
        if (!base)
                base = "";
index a010b2c325ffbec07fbd6b90a59f6582640b81ef..4b2754345add857ea904998f94e781fedc8b094e 100644 (file)
@@ -507,9 +507,9 @@ int cmd_add(int argc, const char **argv, const char *prefix)
                add_interactive = 1;
        if (add_interactive) {
                if (show_only)
-                       die(_("--dry-run is incompatible with --interactive/--patch"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--dry-run", "--interactive/--patch");
                if (pathspec_from_file)
-                       die(_("--pathspec-from-file is incompatible with --interactive/--patch"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--interactive/--patch");
                exit(interactive_add(argv + 1, prefix, patch_interactive));
        }
        if (legacy_stash_p) {
@@ -526,7 +526,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
 
        if (edit_interactive) {
                if (pathspec_from_file)
-                       die(_("--pathspec-from-file is incompatible with --edit"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--edit");
                return(edit_patch(argc, argv, prefix));
        }
        argc--;
@@ -538,7 +538,7 @@ int cmd_add(int argc, const char **argv, const char *prefix)
                addremove = 0; /* "-u" was given but not "-A" */
 
        if (addremove && take_worktree_changes)
-               die(_("-A and -u are mutually incompatible"));
+               die(_("options '%s' and '%s' cannot be used together"), "-A", "-u");
 
        if (!show_only && ignore_missing)
                die(_("Option --ignore-missing can only be used together with --dry-run"));
index 6c8b0fcc11fbca461884b6459fd1405293e4ec89..0e93865371c512cd6d8916819dbd5f90bb8ba99f 100644 (file)
@@ -722,7 +722,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
        finalize_colopts(&colopts, -1);
        if (filter.verbose) {
                if (explicitly_enable_column(colopts))
-                       die(_("--column and --verbose are incompatible"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--column", "--verbose");
                colopts = 0;
        }
 
index 79014e1cb6c949cc3b0231454e4f85c9566838ff..73f5a6fbfa1c04099fd5f0ed4151da6d809ea47e 100644 (file)
@@ -464,10 +464,10 @@ static int checkout_paths(const struct checkout_opts *opts,
                die(_("'%s' cannot be used with updating paths"), "--detach");
 
        if (opts->merge && opts->patch_mode)
-               die(_("'%s' cannot be used with %s"), "--merge", "--patch");
+               die(_("options '%s' and '%s' cannot be used together"), "--merge", "--patch");
 
        if (opts->ignore_unmerged && opts->merge)
-               die(_("'%s' cannot be used with %s"),
+               die(_("options '%s' and '%s' cannot be used together"),
                    opts->ignore_unmerged_opt, "-m");
 
        if (opts->new_branch)
@@ -1749,10 +1749,10 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
                        die(_("--pathspec-from-file is incompatible with pathspec arguments"));
 
                if (opts->force_detach)
-                       die(_("--pathspec-from-file is incompatible with --detach"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--detach");
 
                if (opts->patch_mode)
-                       die(_("--pathspec-from-file is incompatible with --patch"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--patch");
 
                parse_pathspec_file(&opts->pathspec, 0,
                                    0,
index fb377b27657c4048a04c85ddb82e15a950db5a7d..13bdbe14b2f2ab3e042a285d05f3c561681e0c76 100644 (file)
@@ -903,7 +903,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
                        die(_("--bare and --origin %s options are incompatible."),
                            option_origin);
                if (real_git_dir)
-                       die(_("--bare and --separate-git-dir are incompatible."));
+                       die(_("options '%s' and '%s' cannot be used together"), "--bare", "--separate-git-dir");
                option_no_checkout = 1;
        }
 
index 883c16256c87f75c8367573ba42a8ee8e04346a7..067c795ca4b7db8c8d1e4854e6e6165dceafc60e 100644 (file)
@@ -355,10 +355,10 @@ static const char *prepare_index(const char **argv, const char *prefix,
 
        if (pathspec_from_file) {
                if (interactive)
-                       die(_("--pathspec-from-file is incompatible with --interactive/--patch"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--interactive/--patch");
 
                if (all)
-                       die(_("--pathspec-from-file with -a does not make sense"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "-a");
 
                if (pathspec.nr)
                        die(_("--pathspec-from-file is incompatible with pathspec arguments"));
@@ -1193,7 +1193,7 @@ static void finalize_deferred_config(struct wt_status *s)
                    status_format == STATUS_FORMAT_UNSPECIFIED)
                        status_format = STATUS_FORMAT_PORCELAIN;
                else if (status_format == STATUS_FORMAT_LONG)
-                       die(_("--long and -z are incompatible"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--long", "-z");
        }
 
        if (use_deferred_config && status_format == STATUS_FORMAT_UNSPECIFIED)
index e912ba50d7bac4fbd562774e00cf454e17651baf..fd5ba1fc6046f8753271f606cc0a06162f48b576 100644 (file)
@@ -590,7 +590,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
        save_commit_buffer = 0;
 
        if (longformat && abbrev == 0)
-               die(_("--long is incompatible with --abbrev=0"));
+               die(_("options '%s' and '%s' cannot be used together"), "--long", "--abbrev=0");
 
        if (contains) {
                struct string_list_item *item;
index 5beadc07ccd7eb215214dcff150f87cddf926e6e..c79fbbf67e5ee0d4e7d09c7997f1fa04dc1400bc 100644 (file)
@@ -730,7 +730,7 @@ int cmd_difftool(int argc, const char **argv, const char *prefix)
                setenv(GIT_DIR_ENVIRONMENT, absolute_path(get_git_dir()), 1);
                setenv(GIT_WORK_TREE_ENVIRONMENT, absolute_path(get_git_work_tree()), 1);
        } else if (dir_diff)
-               die(_("--dir-diff is incompatible with --no-index"));
+               die(_("options '%s' and '%s' cannot be used together"), "--dir-diff", "--no-index");
 
        if (use_gui_tool + !!difftool_cmd + !!extcmd > 1)
                die(_("options '%s', '%s', and '%s' cannot be used together"), "--gui", "--tool", "--extcmd");
index 8e2caf7281970cfb1bd3cf3bad07b488e61b6f07..1f8fe7b3ac1b07bf5ffa83a1e06ebfa936e3f9a2 100644 (file)
@@ -1269,7 +1269,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix)
                printf("feature done\n");
 
        if (import_filename && import_filename_if_exists)
-               die(_("Cannot pass both --import-marks and --import-marks-if-exists"));
+               die(_("options '%s' and '%s' cannot be used together"), "--import-marks", "--import-marks-if-exists");
        if (import_filename)
                import_marks(import_filename, 0);
        else if (import_filename_if_exists)
index c23d01de7dca4240bca05e7a087adceaaef3e78f..30ce2ac746de66070e4f0ecd50591f77b016621d 100644 (file)
@@ -1849,7 +1849,7 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix)
        if (from_stdin && !startup_info->have_repository)
                die(_("--stdin requires a git repository"));
        if (from_stdin && hash_algo)
-               die(_("--object-format cannot be used with --stdin"));
+               die(_("options '%s' and '%s' cannot be used together"), "--object-format", "--stdin");
        if (!index_name && pack_name)
                index_name = derive_filename(pack_name, "pack", "idx", &index_name_buf);
 
index 031fef1bcaa9d08bdad41b56be6e81c18eae485d..9c80cdae951e6579b90d18f9d87caa0ec8b10235 100644 (file)
@@ -767,7 +767,7 @@ int cmd_ls_files(int argc, const char **argv, const char *cmd_prefix)
                 * would not make any sense with this option.
                 */
                if (show_stage || show_unmerged)
-                       die("ls-files --with-tree is incompatible with -s or -u");
+                       die(_("options '%s' and '%s' cannot be used together"), "ls-files --with-tree", "-s/-u");
                overlay_tree_on_index(the_repository->index, with_tree, max_prefix);
        }
 
index 5f0476b0b761b60fdddffbc15217bd4e345570e4..6db961e9d348715b689a3aaf7e76c41b502b1fee 100644 (file)
@@ -1396,9 +1396,9 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 
        if (squash) {
                if (fast_forward == FF_NO)
-                       die(_("You cannot combine --squash with --no-ff."));
+                       die(_("options '%s' and '%s' cannot be used together"), "--squash", "--no-ff.");
                if (option_commit > 0)
-                       die(_("You cannot combine --squash with --commit."));
+                       die(_("options '%s' and '%s' cannot be used together"), "--squash", "--commit.");
                /*
                 * squash can now silently disable option_commit - this is not
                 * a problem as it is only overriding the default, not a user
index b36ed828d8da84464b2e0357d8a090e3062ebfeb..ba2006f2212bea19b202ba3db155b345bf7fbb89 100644 (file)
@@ -4070,7 +4070,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix)
                die(_("--thin cannot be used to build an indexable pack"));
 
        if (keep_unreachable && unpack_unreachable)
-               die(_("--keep-unreachable and --unpack-unreachable are incompatible"));
+               die(_("options '%s' and '%s' cannot be used together"), "--keep-unreachable", "--unpack-unreachable");
        if (!rev_list_all || !rev_list_reflog || !rev_list_index)
                unpack_unreachable_expiration = 0;
 
index 4b026ce6c6a90aea7bf50e8f193a6420471c2df3..359db90321c31ea27aa9160f08d21b89179ca488 100644 (file)
@@ -589,7 +589,7 @@ int cmd_push(int argc, const char **argv, const char *prefix)
        set_push_cert_flags(&flags, push_cert);
 
        if (deleterefs && (tags || (flags & (TRANSPORT_PUSH_ALL | TRANSPORT_PUSH_MIRROR))))
-               die(_("--delete is incompatible with --all, --mirror and --tags"));
+               die(_("options '%s' and '%s' cannot be used together"), "--delete", "--all/--mirror/--tags");
        if (deleterefs && argc < 2)
                die(_("--delete doesn't make sense without any refs"));
 
@@ -627,18 +627,18 @@ int cmd_push(int argc, const char **argv, const char *prefix)
 
        if (flags & TRANSPORT_PUSH_ALL) {
                if (tags)
-                       die(_("--all and --tags are incompatible"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--all", "--tags");
                if (argc >= 2)
                        die(_("--all can't be combined with refspecs"));
        }
        if (flags & TRANSPORT_PUSH_MIRROR) {
                if (tags)
-                       die(_("--mirror and --tags are incompatible"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--mirror", "--tags");
                if (argc >= 2)
                        die(_("--mirror can't be combined with refspecs"));
        }
        if ((flags & TRANSPORT_PUSH_ALL) && (flags & TRANSPORT_PUSH_MIRROR))
-               die(_("--all and --mirror are incompatible"));
+               die(_("options '%s' and '%s' cannot be used together"), "--all", "--mirror");
 
        if (!is_empty_cas(&cas) && (flags & TRANSPORT_PUSH_FORCE_IF_INCLUDES))
                cas.use_force_if_includes = 1;
index 34b4744e5f3b7ccd5c4a215f477a622cfa06e4a0..16e6053b14a1be5a6270c30c9856b42cfe32359d 100644 (file)
@@ -1190,13 +1190,13 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
 
        if (keep_base) {
                if (options.onto_name)
-                       die(_("cannot combine '--keep-base' with '--onto'"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--keep-base", "--onto");
                if (options.root)
-                       die(_("cannot combine '--keep-base' with '--root'"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--keep-base", "--root");
        }
 
        if (options.root && options.fork_point > 0)
-               die(_("cannot combine '--root' with '--fork-point'"));
+               die(_("options '%s' and '%s' cannot be used together"), "--root", "--fork-point");
 
        if (action != ACTION_NONE && !in_progress)
                die(_("No rebase in progress?"));
index 9b0be6a6ab318ecdc6700f1b86da7dfbf89a468e..b7b54781bd281084c5821579a13894ef1a88100b 100644 (file)
@@ -681,7 +681,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
 
        if (keep_unreachable &&
            (unpack_unreachable || (pack_everything & LOOSEN_UNREACHABLE)))
-               die(_("--keep-unreachable and -A are incompatible"));
+               die(_("options '%s' and '%s' cannot be used together"), "--keep-unreachable", "-A");
 
        if (write_bitmaps < 0) {
                if (!write_midx &&
@@ -712,7 +712,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
 
        if (geometric_factor) {
                if (pack_everything)
-                       die(_("--geometric is incompatible with -A, -a"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--geometric", "-A/-a");
                init_pack_geometry(&geometry);
                split_pack_geometry(geometry, geometric_factor);
        }
index b1ff699b43a33b6ddb3301c5fbf6a7dd314b0f6a..248998fd6faa926e513f7706bd464730c5dc62d6 100644 (file)
@@ -423,7 +423,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
 
        if (pathspec_from_file) {
                if (patch_mode)
-                       die(_("--pathspec-from-file is incompatible with --patch"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--patch");
 
                if (pathspec.nr)
                        die(_("--pathspec-from-file is incompatible with pathspec arguments"));
@@ -459,7 +459,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
 
        if (patch_mode) {
                if (reset_type != NONE)
-                       die(_("--patch is incompatible with --{hard,mixed,soft}"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--patch", "--{hard,mixed,soft}");
                trace2_cmd_mode("patch-interactive");
                return run_add_interactive(rev, "--patch=reset", &pathspec);
        }
index 36cb909ebaa51940024dce982dd53e5109c653eb..c1a3b0b35916e307366130d4ad7bcf31ccc2b27e 100644 (file)
@@ -538,7 +538,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
                const char *arg = argv[i];
                if (skip_prefix(arg, "--missing=", &arg)) {
                        if (revs.exclude_promisor_objects)
-                               die(_("cannot combine --exclude-promisor-objects and --missing"));
+                               die(_("options '%s' and '%s' cannot be used together"), "--exclude-promisor-objects", "--missing");
                        if (parse_missing_action_value(arg))
                                break;
                }
index f1e8318592cebc11f5f69ce798a0f5a3e6494ce4..e12c5e80e3e4425831b9803c334245eaedf3bd9a 100644 (file)
@@ -707,8 +707,8 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
                         *
                         * Also --all and --remotes do not make sense either.
                         */
-                       die(_("--reflog is incompatible with --all, --remotes, "
-                             "--independent or --merge-base"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--reflog",
+                               "--all/--remotes/--independent/--merge-base");
        }
 
        /* If nothing is specified, show all branches by default */
index 18c812bbe032cc24e57bd3083822bb4753dfa1ca..4d793bd0b521eab179fbc995ad3764a268ae73bc 100644 (file)
@@ -1700,10 +1700,10 @@ static int push_stash(int argc, const char **argv, const char *prefix,
 
        if (pathspec_from_file) {
                if (patch_mode)
-                       die(_("--pathspec-from-file is incompatible with --patch"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--patch");
 
                if (only_staged)
-                       die(_("--pathspec-from-file is incompatible with --staged"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--staged");
 
                if (ps.nr)
                        die(_("--pathspec-from-file is incompatible with pathspec arguments"));
index 41863c5ab7771a2495fe5845c884d99e83aa1537..dfdcfd37956bfa0ed996a74dc77fedc5d8110f0c 100644 (file)
@@ -522,7 +522,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
        finalize_colopts(&colopts, -1);
        if (cmdmode == 'l' && filter.lines != -1) {
                if (explicitly_enable_column(colopts))
-                       die(_("--column and -n are incompatible"));
+                       die(_("options '%s' and '%s' cannot be used together"), "--column", "-n");
                colopts = 0;
        }
        sorting = ref_sorting_options(&sorting_options);
@@ -564,7 +564,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
 
        if (msg.given || msgfile) {
                if (msg.given && msgfile)
-                       die(_("only one -F or -m option is allowed."));
+                       die(_("options '%s' and '%s' cannot be used together"), "-F", "-m");
                if (msg.given)
                        strbuf_addbuf(&buf, &(msg.buf));
                else {
index 5390a479b30fb91222e2c326b6930182feb0620e..d28b63a32531b44673d965d8171952864a28eb13 100644 (file)
@@ -2300,11 +2300,11 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
                revs->left_only = 1;
        } else if (!strcmp(arg, "--right-only")) {
                if (revs->left_only)
-                       die("--right-only is incompatible with --left-only");
+                       die(_("options '%s' and '%s' cannot be used together"), "--right-only", "--left-only");
                revs->right_only = 1;
        } else if (!strcmp(arg, "--cherry")) {
                if (revs->left_only)
-                       die("--cherry is incompatible with --left-only");
+                       die(_("options '%s' and '%s' cannot be used together"), "--cherry", "--left-only");
                revs->cherry_mark = 1;
                revs->right_only = 1;
                revs->max_parents = 1;
@@ -2313,12 +2313,12 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
                revs->count = 1;
        } else if (!strcmp(arg, "--cherry-mark")) {
                if (revs->cherry_pick)
-                       die("--cherry-mark is incompatible with --cherry-pick");
+                       die(_("options '%s' and '%s' cannot be used together"), "--cherry-mark", "--cherry-pick");
                revs->cherry_mark = 1;
                revs->limited = 1; /* needs limit_list() */
        } else if (!strcmp(arg, "--cherry-pick")) {
                if (revs->cherry_mark)
-                       die("--cherry-pick is incompatible with --cherry-mark");
+                       die(_("options '%s' and '%s' cannot be used together"), "--cherry-pick", "--cherry-mark");
                revs->cherry_pick = 1;
                revs->limited = 1;
        } else if (!strcmp(arg, "--objects")) {
@@ -2524,7 +2524,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
                return opts;
        }
        if (revs->graph && revs->track_linear)
-               die("--show-linear-break and --graph are incompatible");
+               die(_("options '%s' and '%s' cannot be used together"), "--show-linear-break", "--graph");
 
        return 1;
 }
@@ -2867,22 +2867,22 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
        compile_grep_patterns(&revs->grep_filter);
 
        if (revs->reverse && revs->reflog_info)
-               die("cannot combine --reverse with --walk-reflogs");
+               die(_("options '%s' and '%s' cannot be used together"), "--reverse", "--walk-reflogs");
        if (revs->reflog_info && revs->limited)
                die("cannot combine --walk-reflogs with history-limiting options");
        if (revs->rewrite_parents && revs->children.name)
-               die("cannot combine --parents and --children");
+               die(_("options '%s' and '%s' cannot be used together"), "--parents", "--children");
 
        /*
         * Limitations on the graph functionality
         */
        if (revs->reverse && revs->graph)
-               die("cannot combine --reverse with --graph");
+               die(_("options '%s' and '%s' cannot be used together"), "--reverse", "--graph");
 
        if (revs->reflog_info && revs->graph)
-               die("cannot combine --walk-reflogs with --graph");
+               die(_("options '%s' and '%s' cannot be used together"), "--walk-reflogs", "--graph");
        if (revs->no_walk && revs->graph)
-               die("cannot combine --no-walk with --graph");
+               die(_("options '%s' and '%s' cannot be used together"), "--no-walk", "--graph");
        if (!revs->reflog_info && revs->grep_filter.use_reflog_filter)
                die("cannot use --grep-reflog without --walk-reflogs");
 
index 9db11f86dd6e901cfb8f3241da3ee5f1710aa1c4..fbe26de2f90c1cd278b8471fe8a59f361606df49 100755 (executable)
@@ -149,10 +149,10 @@ test_expect_success 'error conditions' '
        echo fileA.t >list &&
 
        test_must_fail git checkout --pathspec-from-file=list --detach 2>err &&
-       test_i18ngrep -e "--pathspec-from-file is incompatible with --detach" err &&
+       test_i18ngrep -e "options .--pathspec-from-file. and .--detach. cannot be used together" err &&
 
        test_must_fail git checkout --pathspec-from-file=list --patch 2>err &&
-       test_i18ngrep -e "--pathspec-from-file is incompatible with --patch" err &&
+       test_i18ngrep -e "options .--pathspec-from-file. and .--patch. cannot be used together" err &&
 
        test_must_fail git checkout --pathspec-from-file=list -- fileA.t 2>err &&
        test_i18ngrep -e "--pathspec-from-file is incompatible with pathspec arguments" err &&
index b48345bf95f4a34df369d385e74e49d94be96e5f..ad1fc0ed071dfa90ef9c9369c88e74b4bf87b25c 100755 (executable)
@@ -152,7 +152,7 @@ test_expect_success 'error conditions' '
        >empty_list &&
 
        test_must_fail git restore --pathspec-from-file=list --patch --source=HEAD^1 2>err &&
-       test_i18ngrep -e "--pathspec-from-file is incompatible with --patch" err &&
+       test_i18ngrep -e "options .--pathspec-from-file. and .--patch. cannot be used together" err &&
 
        test_must_fail git restore --pathspec-from-file=list --source=HEAD^1 -- fileA.t 2>err &&
        test_i18ngrep -e "--pathspec-from-file is incompatible with pathspec arguments" err &&
index 4c98d99e7e87476811877b4685f2f5a5eefe0f35..1d0b15380edf3195b10e25a7d8d36f93330b95f5 100755 (executable)
@@ -83,7 +83,7 @@ test_expect_success 'git rebase --fork-point with ambigous refname' '
 
 test_expect_success '--fork-point and --root both given' '
        test_must_fail git rebase --fork-point --root 2>err &&
-       test_i18ngrep "cannot combine" err
+       test_i18ngrep "cannot be used together" err
 '
 
 test_expect_success 'rebase.forkPoint set to false' '
index 5d5164d1fc67f30a5e8f0da57457dd160e8760af..7e17ae80229c26d39d3602aa4b73845af36d0d18 100755 (executable)
@@ -138,13 +138,13 @@ test_expect_success 'error conditions' '
        >empty_list &&
 
        test_must_fail git add --pathspec-from-file=list --interactive 2>err &&
-       test_i18ngrep -e "--pathspec-from-file is incompatible with --interactive/--patch" err &&
+       test_i18ngrep -e "options .--pathspec-from-file. and .--interactive/--patch. cannot be used together" err &&
 
        test_must_fail git add --pathspec-from-file=list --patch 2>err &&
-       test_i18ngrep -e "--pathspec-from-file is incompatible with --interactive/--patch" err &&
+       test_i18ngrep -e "options .--pathspec-from-file. and .--interactive/--patch. cannot be used together" err &&
 
        test_must_fail git add --pathspec-from-file=list --edit 2>err &&
-       test_i18ngrep -e "--pathspec-from-file is incompatible with --edit" err &&
+       test_i18ngrep -e "options .--pathspec-from-file. and .--edit. cannot be used together" err &&
 
        test_must_fail git add --pathspec-from-file=list -- fileA.t 2>err &&
        test_i18ngrep -e "--pathspec-from-file is incompatible with pathspec arguments" err &&
index 55e050cfd4db8ffc2ad0826baa5c50fc2734c726..aae2b25f76667bff7af84c53f54418b9931a8ff4 100755 (executable)
@@ -88,7 +88,7 @@ test_expect_success 'error conditions' '
        echo fileA.t >list &&
 
        test_must_fail git stash push --pathspec-from-file=list --patch 2>err &&
-       test_i18ngrep -e "--pathspec-from-file is incompatible with --patch" err &&
+       test_i18ngrep -e "options .--pathspec-from-file. and .--patch. cannot be used together" err &&
 
        test_must_fail git stash push --pathspec-from-file=list -- fileA.t 2>err &&
        test_i18ngrep -e "--pathspec-from-file is incompatible with pathspec arguments" err &&
index d822153e4d29240babbd2904af9527e6f93e6528..3af3577af0be498467c82e88868dfaf7ee883d78 100755 (executable)
@@ -54,7 +54,7 @@ test_expect_success 'disallows --bare with --separate-git-dir' '
 
        test_must_fail git clone --bare --separate-git-dir dot-git-destiation parent clone-bare-sgd 2>err &&
        test_debug "cat err" &&
-       test_i18ngrep -e "--bare and --separate-git-dir are incompatible" err
+       test_i18ngrep -e "options .--bare. and .--separate-git-dir. cannot be used together" err
 
 '
 
index 15ccb14f7e26faa41ba07d7901e498a0f75f726d..b211fbc0a520116d81df29c31d729012912dc5a3 100755 (executable)
@@ -160,7 +160,7 @@ test_expect_success 'error conditions' '
        git rm fileA.t &&
 
        test_must_fail git reset --pathspec-from-file=list --patch 2>err &&
-       test_i18ngrep -e "--pathspec-from-file is incompatible with --patch" err &&
+       test_i18ngrep -e "options .--pathspec-from-file. and .--patch. cannot be used together" err &&
 
        test_must_fail git reset --pathspec-from-file=list -- fileA.t 2>err &&
        test_i18ngrep -e "--pathspec-from-file is incompatible with pathspec arguments" err &&
index dca62fc48e52031c83a4f78caa45181b584b38f4..574cf30285cacde0d89de6b2b85dc63da42d6589 100755 (executable)
@@ -141,13 +141,13 @@ test_expect_success 'error conditions' '
        >empty_list &&
 
        test_must_fail git commit --pathspec-from-file=list --interactive -m "Commit" 2>err &&
-       test_i18ngrep -e "--pathspec-from-file is incompatible with --interactive/--patch" err &&
+       test_i18ngrep -e "options .--pathspec-from-file. and .--interactive/--patch. cannot be used together" err &&
 
        test_must_fail git commit --pathspec-from-file=list --patch -m "Commit" 2>err &&
-       test_i18ngrep -e "--pathspec-from-file is incompatible with --interactive/--patch" err &&
+       test_i18ngrep -e "options .--pathspec-from-file. and .--interactive/--patch. cannot be used together" err &&
 
        test_must_fail git commit --pathspec-from-file=list --all -m "Commit" 2>err &&
-       test_i18ngrep -e "--pathspec-from-file with -a does not make sense" err &&
+       test_i18ngrep -e "options .--pathspec-from-file. and .-a. cannot be used together" err &&
 
        test_must_fail git commit --pathspec-from-file=list -m "Commit" -- fileA.t 2>err &&
        test_i18ngrep -e "--pathspec-from-file is incompatible with pathspec arguments" err &&