From patchwork Mon Dec 27 23:23:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 12700064 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C516C433F5 for ; Mon, 27 Dec 2021 23:24:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233930AbhL0XYD (ORCPT ); Mon, 27 Dec 2021 18:24:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230099AbhL0XYC (ORCPT ); Mon, 27 Dec 2021 18:24:02 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7A4CC06173E for ; Mon, 27 Dec 2021 15:24:01 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id t18so34861484wrg.11 for ; Mon, 27 Dec 2021 15:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=s4gO+nDpM5UBlN8gg+47JlrdBzaim4GQc6jkFe07im8=; b=qAyw2WwmLR9ZDeqt+R3mMAfMozfuETW2CJLk3T65tfLH1KH+alLYZPXlYMRGOXUFUa qqsFUO/jPT77xqMiYIvOXgSKGgVJnkP/EcFyI/Fckr830dgNoftKh/92fWgM0M/BPWX7 QBRYgVo3zTWgHuDznSsPzO7TjyY3Dt/19RLXVYdEK6HB1OPfeW7Gt59odCCzg5J3BtwU 25h3tkmrlnlL/CDDdLRH4AsWcJeyv0NlA2ygKzmgXmJYwMTdHH/DwlWQ932SgEtswT6f qkGYvujZpEQQC/EKDb82xBy8qD4/KrmpKhmMKZARiihdjsFDCw67nuS5i7SNfSOmBNLZ ABow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=s4gO+nDpM5UBlN8gg+47JlrdBzaim4GQc6jkFe07im8=; b=BMVh7abk0Tw0mAOB3adRq6Il2s23hF4QoshNkSdwsYV0f6UAOMTjhEoWS9NyrtZdei 4x3ByDwkettCbj24iyspOlN68cpvgLnfAyzuekynbx74dwK6cCg1hKxNaijLbzLS0O7T +yzXUgNvPBksOF4Vj+zPXp0JTIIH+ixTXAaBLmkE7Wk6HROvere5DmcXcHp4xUrxdKAC nMJqnE0kP9V9sKfhNREyRpM4XkUP72zeNmGMvRcKBg3b+wq2hacoa9ohS1H+m1TdEPQC Lr3rHtorRd4WBut9xRt1LlEwaq7b9EeHe0ggbQ9exF+lE0oYebeqv5sSBOEdBOTMw8Ss O7Vw== X-Gm-Message-State: AOAM530tHmut4M0L1fQyVmddw10ICEmA4mF1oc/3d+ycVc2/3DilEFR8 hY0r9zxzrxiC9DmLmrrfjdkb7MKp7MM= X-Google-Smtp-Source: ABdhPJxhhsQ2Ffa7UWSJf4pVQRkcGLrup6qcL2+8mKwYMas0eB5AW4K/7PZH9QqlQ+/2n0nj+F/4AQ== X-Received: by 2002:adf:cc8d:: with SMTP id p13mr13612672wrj.688.1640647440076; Mon, 27 Dec 2021 15:24:00 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id k7sm16540129wrg.105.2021.12.27.15.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 15:23:59 -0800 (PST) Message-Id: <71699eaa27b7144df5277fa9a8867915db27f0a2.1640647437.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 27 Dec 2021 23:23:47 +0000 Subject: [PATCH v2 01/11] i18n: refactor "foo and bar are mutually exclusive" MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Jeff King , Johannes Sixt , =?utf-8?b?w4Z2?= =?utf-8?b?YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?q?J?= =?utf-8?q?ean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No=C3=AB?= =?utf-8?q?l_Avila?= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= 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 --- builtin/checkout.c | 2 +- builtin/diff-tree.c | 2 +- builtin/fetch.c | 4 ++-- builtin/init-db.c | 2 +- builtin/log.c | 4 ++-- builtin/submodule--helper.c | 4 ++-- builtin/worktree.c | 2 +- range-diff.c | 2 +- t/t0001-init.sh | 2 +- t/t2025-checkout-no-overlay.sh | 2 +- t/t4209-log-pickaxe.sh | 6 +++--- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 72beeb49aa9..79014e1cb6c 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 f33d30d57bf..0e0ac1f1670 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 f1fe73a3e0f..2c584c85812 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 2167796ff2a..546f9c595e7 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 93ace0dde7d..fad93ad2fc1 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 9b25a508e6a..c5d3fc3817f 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 a396cfdc64e..9a520485769 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; diff --git a/range-diff.c b/range-diff.c index cac89a2f4f2..30a4de5c2d8 100644 --- a/range-diff.c +++ b/range-diff.c @@ -556,7 +556,7 @@ int show_range_diff(const char *range1, const char *range2, struct string_list branch2 = STRING_LIST_INIT_DUP; if (range_diff_opts->left_only && range_diff_opts->right_only) - res = error(_("--left-only and --right-only are mutually exclusive")); + res = error(_("options '%s' and '%s' cannot be used together"), "--left-only", "--right-only"); if (!res && read_patches(range1, &branch1, range_diff_opts->other_arg)) res = error(_("could not parse log for '%s'"), range1); diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 7603ad2f82b..3235ab4d53c 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -331,7 +331,7 @@ test_expect_success 'init with separate gitdir' ' test_expect_success 'explicit bare & --separate-git-dir incompatible' ' test_must_fail git init --bare --separate-git-dir goop.git bare.git 2>err && - test_i18ngrep "mutually exclusive" err + test_i18ngrep "cannot be used together" err ' test_expect_success 'implicit bare & --separate-git-dir incompatible' ' diff --git a/t/t2025-checkout-no-overlay.sh b/t/t2025-checkout-no-overlay.sh index fa9e0987063..8f13341cf8e 100755 --- a/t/t2025-checkout-no-overlay.sh +++ b/t/t2025-checkout-no-overlay.sh @@ -25,7 +25,7 @@ test_expect_success 'checkout --no-overlay removing last file from directory' ' test_expect_success 'checkout -p --overlay is disallowed' ' test_must_fail git checkout -p --overlay HEAD 2>actual && - test_i18ngrep "fatal: -p and --overlay are mutually exclusive" actual + test_i18ngrep "fatal: options .-p. and .--overlay. cannot be used together" actual ' test_expect_success '--no-overlay --theirs with D/F conflict deletes file' ' 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 From patchwork Mon Dec 27 23:23:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 12700066 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A06BC433FE for ; Mon, 27 Dec 2021 23:24:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233943AbhL0XYF (ORCPT ); Mon, 27 Dec 2021 18:24:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233931AbhL0XYD (ORCPT ); Mon, 27 Dec 2021 18:24:03 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 618AAC06173E for ; Mon, 27 Dec 2021 15:24:02 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id e5so34903233wrc.5 for ; Mon, 27 Dec 2021 15:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=kLWVhsGbGtij1h9vvbHHwRdAjtezzVMqTh73NV1sLjk=; b=K4d2v9C1HXht2NmLjgOp0Rl73a/eem92kD6S4qfJjQSbaD0Sm7/pPZF83d6SwXM6Zs PHe8lpDcMgrRIFfLJYM9jYRUStp82tEdToXhF2N6YNFUYa3iKXoQ6PGAGtU7m9+kIpj0 m64lBkNCN+p/9B2LiyxUhMZyJ71XBNddtA0hK9R0wSn0u27Om0ZjjxAfOCWPxDWUV13c F6guxkvtahGCz+JOcvxU11NVTOe9yRi/tezpaSFEuQbftVzi5UDSO+Fkyx7tsoHyQsRa bo84pTOjhLm2dlFSCyBanVbS3cBDDV90UnGXnyTrf2yCOTj/NH64JXAtm9+bvH5mOyXR tUWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=kLWVhsGbGtij1h9vvbHHwRdAjtezzVMqTh73NV1sLjk=; b=czptXJrGwjUb3/r4hes5/jBO21bTdDXVNQBGAg1IXtokn05Or9jChhCan5GdqPpXhB tVRZGnaw1Oeu+vS9X7b0NJLBLDyC3UEKWDlFYWi7lD1TBpFWOjH95uRQfkjQJc+b3phD CgXAv11njzdnGSnOz09sA7xaXNQ3OmK65QqEkRPDy8nqcwgNO62z1dOKiqt4pz/uEy5j iil23K54iBXOFYv6vVWjdP4/CNmz+9rQljVB/Oe4IAhofRQOkjIbrpcR7Bz9ewyiVEOV r0Dz+PgHM0pa0pYXIGvgAReYvr0Od0tb6JQHEMT+QDyPG4Xt49VTec9dREuuCFsbpE23 T1FQ== X-Gm-Message-State: AOAM530vkpfBcvWpE47mlvR2glSm1M2XvFL0S8n9naAmv1YVtZUDQ9Aw Pqqc0fWCkFLP2gGyxp077fADjk9hEr4= X-Google-Smtp-Source: ABdhPJwVcuZh/IGfk1uJ7DV5IJ6lgMDCFtrJTQqUu696WuNdUfeBti/4LLszpfwzNM8w/VNm6b0NsQ== X-Received: by 2002:adf:dd83:: with SMTP id x3mr14356993wrl.367.1640647440867; Mon, 27 Dec 2021 15:24:00 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id f16sm24912233wmg.27.2021.12.27.15.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 15:24:00 -0800 (PST) Message-Id: In-Reply-To: References: Date: Mon, 27 Dec 2021 23:23:48 +0000 Subject: [PATCH v2 02/11] i18n: refactor "%s, %s and %s are mutually exclusive" MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Jeff King , Johannes Sixt , =?utf-8?b?w4Z2?= =?utf-8?b?YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?q?J?= =?utf-8?q?ean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No=C3=AB?= =?utf-8?q?l_Avila?= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Use placeholders for constant tokens. The strings are turned into "cannot be used together" Signed-off-by: Jean-Noël Avila --- builtin/difftool.c | 2 +- builtin/log.c | 2 +- builtin/worktree.c | 2 +- diff.c | 2 +- 4 files changed, 4 insertions(+), 4 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")); From patchwork Mon Dec 27 23:23:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 12700071 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 784F2C4332F for ; Mon, 27 Dec 2021 23:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233981AbhL0XYL (ORCPT ); Mon, 27 Dec 2021 18:24:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233935AbhL0XYE (ORCPT ); Mon, 27 Dec 2021 18:24:04 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62330C061401 for ; Mon, 27 Dec 2021 15:24:03 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id g191-20020a1c9dc8000000b0032fbf912885so9074953wme.4 for ; Mon, 27 Dec 2021 15:24:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=vbZt8+YsXMYIh5z0dbFZU5e/g6v9rtXRxVX24l8B+F8=; b=U2KWp2ESsFj2Gh+5gq0Sh8m9uR0/Ds5X+T5AWIryUDHXWUqnnaVc2fVpfCDsKk9bZf PBpp6k9rC7MwN6bsCF8ig3bHmxIiOkoqmRaz5mCjNH6NAA1xwk8+7ZLwwnKICpcWbnRY iTqZA7/T79gmfp2dy5FtF/b4gveJY4Jl45XhDxKSPYweljOKy1ByQQF/NIHzmk7yT9Rx ArLeGHc8mbhFZLAeqdMiDMbKrCERTZJQbbbL8qdag8z2btOeczlSNm5qkyFSyjqKNpS3 CV1prQ5xnJCEjVtNDIO5XZ8eTXFyzSDUHQD3c+CiPurhkyODSDmZKnO8qFdhjnhucFP9 2x/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=vbZt8+YsXMYIh5z0dbFZU5e/g6v9rtXRxVX24l8B+F8=; b=pgeKWF3PFxgn1eGkH1qgqmR6hhesiHZGWFv/mhe3VD+IPrMLMscrxgAieVkXslcvoM E7U4VaFjewyzhL1FNtU2RqZAVtOJBr9e5B2Q9Dk1YN92DJ8JtquOu8O7EPaYdZLja8lg l5CC3Jy9Q0QU4kiRi92uIAiSIanQ88ccOxCVkbUgfKZvGX1cHsaYTIGU51ZLeAS/TPfE ssdYsMileyL0/F9ww25skpuq2X/gxyHfsaIyersX3ldpRoqdrpSt+Nx/mQC249vPT28p XCGK0gOoFyGszYniIEa+YRWTxZHxFrqWv7eLtbUwOSgbioEo/tpThzO48shhEfY0lTde tQ2Q== X-Gm-Message-State: AOAM531hXHjd5P/O3HWDB0CSaLx3vHxgcBbbUCUEDhw3dRbWyaHQseO7 duJ6mQFANwXsYrdcE1Gt2d+0PabSAcA= X-Google-Smtp-Source: ABdhPJzASfa28/3k+H8qd4G67/yn+ZMnX9vxrPh76jcXoi0F6mVOg2ZRu6n/54jYN5co9q4xBx4+Pg== X-Received: by 2002:a7b:ce15:: with SMTP id m21mr14660107wmc.147.1640647441437; Mon, 27 Dec 2021 15:24:01 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id l25sm16381991wmh.18.2021.12.27.15.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 15:24:01 -0800 (PST) Message-Id: <53bad588bfc0499b3dedf104719bf1e14da94674.1640647437.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 27 Dec 2021 23:23:49 +0000 Subject: [PATCH v2 03/11] i18n: turn "options are incompatible" into "cannot be used together" MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Jeff King , Johannes Sixt , =?utf-8?b?w4Z2?= =?utf-8?b?YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?q?J?= =?utf-8?q?ean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No=C3=AB?= =?utf-8?q?l_Avila?= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Signed-off-by: Jean-Noël Avila --- apply.c | 2 +- archive.c | 2 +- builtin/add.c | 8 ++++---- builtin/branch.c | 2 +- builtin/checkout.c | 4 ++-- builtin/clone.c | 2 +- builtin/commit.c | 6 +++--- builtin/describe.c | 2 +- builtin/difftool.c | 2 +- builtin/fast-export.c | 2 +- builtin/index-pack.c | 2 +- builtin/ls-files.c | 2 +- builtin/merge.c | 4 ++-- builtin/pack-objects.c | 2 +- builtin/push.c | 8 ++++---- builtin/rebase.c | 6 +++--- builtin/repack.c | 4 ++-- builtin/reset.c | 4 ++-- builtin/rev-list.c | 2 +- builtin/show-branch.c | 4 ++-- builtin/stash.c | 4 ++-- builtin/tag.c | 2 +- revision.c | 22 +++++++++++----------- t/t2026-checkout-pathspec-file.sh | 4 ++-- t/t2072-restore-pathspec-file.sh | 2 +- t/t3704-add-pathspec-file.sh | 6 +++--- t/t3909-stash-pathspec-file.sh | 2 +- t/t5606-clone-options.sh | 2 +- t/t7107-reset-pathspec-file.sh | 2 +- t/t7526-commit-pathspec-file.sh | 4 ++-- 30 files changed, 60 insertions(+), 60 deletions(-) diff --git a/apply.c b/apply.c index fed195250b6..000f2a9b1b3 100644 --- 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")); diff --git a/archive.c b/archive.c index a3bbb091256..e85ba169088 100644 --- 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 = ""; diff --git a/builtin/add.c b/builtin/add.c index a010b2c325f..4b2754345ad 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -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")); diff --git a/builtin/branch.c b/builtin/branch.c index 6c8b0fcc11f..0e93865371c 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -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; } diff --git a/builtin/checkout.c b/builtin/checkout.c index 79014e1cb6c..2d7bfbd0f1a 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -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, diff --git a/builtin/clone.c b/builtin/clone.c index fb377b27657..13bdbe14b2f 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -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; } diff --git a/builtin/commit.c b/builtin/commit.c index 883c16256c8..5c1aaa42131 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -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) diff --git a/builtin/describe.c b/builtin/describe.c index e912ba50d7b..fd5ba1fc604 100644 --- a/builtin/describe.c +++ b/builtin/describe.c @@ -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; diff --git a/builtin/difftool.c b/builtin/difftool.c index c2b049aafc9..f5db9bcd7b0 100644 --- a/builtin/difftool.c +++ b/builtin/difftool.c @@ -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"); diff --git a/builtin/fast-export.c b/builtin/fast-export.c index 8e2caf72819..1f8fe7b3ac1 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -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) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index c23d01de7dc..30ce2ac746d 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -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); diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 031fef1bcaa..9c80cdae951 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@ -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); } diff --git a/builtin/merge.c b/builtin/merge.c index 5f0476b0b76..6db961e9d34 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -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 diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index b36ed828d8d..ba2006f2212 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -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; diff --git a/builtin/push.c b/builtin/push.c index 4b026ce6c6a..359db90321c 100644 --- a/builtin/push.c +++ b/builtin/push.c @@ -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; diff --git a/builtin/rebase.c b/builtin/rebase.c index 34b4744e5f3..ed326b8aecc 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -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?")); diff --git a/builtin/repack.c b/builtin/repack.c index 9b0be6a6ab3..f13bca4719e 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -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); } diff --git a/builtin/reset.c b/builtin/reset.c index b1ff699b43a..248998fd6fa 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -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); } diff --git a/builtin/rev-list.c b/builtin/rev-list.c index 36cb909ebaa..de60cbdbc9d 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -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; } diff --git a/builtin/show-branch.c b/builtin/show-branch.c index f1e8318592c..e12c5e80e3e 100644 --- a/builtin/show-branch.c +++ b/builtin/show-branch.c @@ -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 */ diff --git a/builtin/stash.c b/builtin/stash.c index 18c812bbe03..4d793bd0b52 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @@ -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")); diff --git a/builtin/tag.c b/builtin/tag.c index 41863c5ab77..6f7cd0e3ef5 100644 --- a/builtin/tag.c +++ b/builtin/tag.c @@ -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); diff --git a/revision.c b/revision.c index 5390a479b30..fe445dd5d45 100644 --- a/revision.c +++ b/revision.c @@ -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,24 +2867,24 @@ 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"); + die(_("%s requires %s"), "--grep-reflog", "--walk-reflogs"); if (revs->line_level_traverse && (revs->diffopt.output_format & ~(DIFF_FORMAT_PATCH | DIFF_FORMAT_NO_OUTPUT))) diff --git a/t/t2026-checkout-pathspec-file.sh b/t/t2026-checkout-pathspec-file.sh index 9db11f86dd6..fbe26de2f90 100755 --- a/t/t2026-checkout-pathspec-file.sh +++ b/t/t2026-checkout-pathspec-file.sh @@ -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 && diff --git a/t/t2072-restore-pathspec-file.sh b/t/t2072-restore-pathspec-file.sh index b48345bf95f..ad1fc0ed071 100755 --- a/t/t2072-restore-pathspec-file.sh +++ b/t/t2072-restore-pathspec-file.sh @@ -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 && diff --git a/t/t3704-add-pathspec-file.sh b/t/t3704-add-pathspec-file.sh index 5d5164d1fc6..7e17ae80229 100755 --- a/t/t3704-add-pathspec-file.sh +++ b/t/t3704-add-pathspec-file.sh @@ -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 && diff --git a/t/t3909-stash-pathspec-file.sh b/t/t3909-stash-pathspec-file.sh index 55e050cfd4d..aae2b25f766 100755 --- a/t/t3909-stash-pathspec-file.sh +++ b/t/t3909-stash-pathspec-file.sh @@ -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 && diff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh index d822153e4d2..3af3577af0b 100755 --- a/t/t5606-clone-options.sh +++ b/t/t5606-clone-options.sh @@ -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 ' diff --git a/t/t7107-reset-pathspec-file.sh b/t/t7107-reset-pathspec-file.sh index 15ccb14f7e2..b211fbc0a52 100755 --- a/t/t7107-reset-pathspec-file.sh +++ b/t/t7107-reset-pathspec-file.sh @@ -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 && diff --git a/t/t7526-commit-pathspec-file.sh b/t/t7526-commit-pathspec-file.sh index dca62fc48e5..fb5857b2a13 100755 --- a/t/t7526-commit-pathspec-file.sh +++ b/t/t7526-commit-pathspec-file.sh @@ -141,10 +141,10 @@ 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 && From patchwork Mon Dec 27 23:23:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 12700070 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6665EC433EF for ; Mon, 27 Dec 2021 23:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233973AbhL0XYK (ORCPT ); Mon, 27 Dec 2021 18:24:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233928AbhL0XYE (ORCPT ); Mon, 27 Dec 2021 18:24:04 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E56CC06173E for ; Mon, 27 Dec 2021 15:24:03 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id a83-20020a1c9856000000b00344731e044bso9086875wme.1 for ; Mon, 27 Dec 2021 15:24:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=2i7GcNJ78FgiIt8YPh4wnGl4jPlfW6qzCRzbbzfKR7A=; b=MePD0MLS5MYb7ftBl6VJLbXQ8k9bxDVSQ5ZDwEgsw2AElVWbJsUrQmR1gElo2mc/Cp fbYpVcEpODj5ikIke7YtYMYbLGAKLOdNi7RuabvFr8IMjZRZ+2KdtSW53nOTetOhS5/b qqUk/jR/z2KlOUo1eGRXbC/N4Nor060kVi7veaa7eNSZZ8/etzz7ONIPgOOijQnJhxom hMPp7Z790n7T5z3hQadfdAci2XwF+X9TyxKHG0ylk7nGYNYIA0FK8gFdWFg8qDVmFZL4 OCXLS6jBcrRa0Gqowwe3RZ8WLEBXoxTz25a4208K08S2exa/2UIKy7d0YowLGVill+No rggA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=2i7GcNJ78FgiIt8YPh4wnGl4jPlfW6qzCRzbbzfKR7A=; b=eY5YsBr0q6qr5tmjS6hBMs1tZ0UrucZFDJwiUBLoY/7mK30hr2mC3vbAv/I2B8gYEP 8m/m7euv/S1+CSgsNEU06gS5OUWMLXJ97k4iCEV9kzze0R9GHxeaiym26vNzd6iDhrMb N3g0pbxzBlSC5h1HPnryoHbDrdsIQPGwKVf+VhYDmKB+1Hm3/W0QxHW0roVZBJiN3Brf E0BG6gWgnJuCL337VrWJb97e8zmWpfm6XFI9eEFJly5gCM1XlCe3+rZ6S+pKusUcF8i9 de15SvN87GrXzitPoiGtoXsknlW04soQaw2zkAa8iU98L8TllqARUm+EiDBY0UBKX0xF CKSA== X-Gm-Message-State: AOAM530C63OxLIhHNMdIIqtma3v1pyYVG2KkKjGgxBk7idTSetVJ0Nhd eLJ3ONX83IO5nEDiZBGG7idTJHuklB4= X-Google-Smtp-Source: ABdhPJwvvqRRWdWc+YwnP+g9L4sENIL3OdxPx78+6/WwoNQ4iB9RlZyEp+cFHZgJDJym3Ta4TxSB/g== X-Received: by 2002:a7b:c306:: with SMTP id k6mr14989284wmj.15.1640647441908; Mon, 27 Dec 2021 15:24:01 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 14sm17947521wry.23.2021.12.27.15.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 15:24:01 -0800 (PST) Message-Id: <88dfde62eda89a9c22194b181166008830aadc77.1640647438.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 27 Dec 2021 23:23:50 +0000 Subject: [PATCH v2 04/11] i18n: standardize "cannot open" and "cannot read" MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Jeff King , Johannes Sixt , =?utf-8?b?w4Z2?= =?utf-8?b?YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?q?J?= =?utf-8?q?ean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No=C3=AB?= =?utf-8?q?l_Avila?= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Signed-off-by: Jean-Noël Avila --- archive.c | 4 ++-- builtin/fetch.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/archive.c b/archive.c index e85ba169088..78d35467008 100644 --- a/archive.c +++ b/archive.c @@ -185,7 +185,7 @@ static int write_archive_entry(const struct object_id *oid, const char *base, buffer = object_file_to_archive(args, path.buf, oid, mode, &type, &size); if (!buffer) - return error(_("cannot read %s"), oid_to_hex(oid)); + return error(_("cannot read '%s'"), oid_to_hex(oid)); err = write_entry(args, oid, path.buf, path.len, mode, buffer, size); free(buffer); return err; @@ -338,7 +338,7 @@ int write_archive_entries(struct archiver_args *args, strbuf_reset(&content); if (strbuf_read_file(&content, path, info->stat.st_size) < 0) - err = error_errno(_("could not read '%s'"), path); + err = error_errno(_("cannot read '%s'"), path); else err = write_entry(args, &fake_oid, path_in_archive.buf, path_in_archive.len, diff --git a/builtin/fetch.c b/builtin/fetch.c index 2c584c85812..c0855c363fd 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -996,7 +996,7 @@ static int open_fetch_head(struct fetch_head *fetch_head) if (write_fetch_head) { fetch_head->fp = fopen(filename, "a"); if (!fetch_head->fp) - return error_errno(_("cannot open %s"), filename); + return error_errno(_("cannot open '%s'"), filename); strbuf_init(&fetch_head->buf, 0); } else { fetch_head->fp = NULL; @@ -1408,7 +1408,7 @@ static int truncate_fetch_head(void) FILE *fp = fopen_for_writing(filename); if (!fp) - return error_errno(_("cannot open %s"), filename); + return error_errno(_("cannot open '%s'"), filename); fclose(fp); return 0; } From patchwork Mon Dec 27 23:23:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 12700067 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56102C433FE for ; Mon, 27 Dec 2021 23:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233964AbhL0XYJ (ORCPT ); Mon, 27 Dec 2021 18:24:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233936AbhL0XYE (ORCPT ); Mon, 27 Dec 2021 18:24:04 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14855C061757 for ; Mon, 27 Dec 2021 15:24:04 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id a203-20020a1c7fd4000000b003457874263aso11760881wmd.2 for ; Mon, 27 Dec 2021 15:24:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=DXvU1WRND/1OxKy66Ot0PFFUbBLPRT2Ur5ESuVWIymY=; b=kBmNiiLDjjUC9/fjsuuAjvaXMCxsPeKn2PjW2G0Xa5T2iD1VilGD71li96ZW6hP/jf SPb2xfrDMR2yzQz6I3/7paBGrwLzBUiUAauDOcf8Y9b6pUCg0mXGI+Sv9poUfCD5PbTp o3dZVdDUeeCRliyX56blFgBEecZ2DJSKfLCc97BNmlUbi1/Y5JloQ1B+g8N4IaVyhxhc b3I1gffpdGuMKmDVaXbO7YqypUKB1QCkbpClHz6SxIpsCKMFnZgXCYEAOE77I1isieNj 7LANbJagVjJUbKZPJONjt31432nRblYy6JuyvyICbNes0wam+ayMTlnRWHr1KXqGivm8 5IxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=DXvU1WRND/1OxKy66Ot0PFFUbBLPRT2Ur5ESuVWIymY=; b=hpNOte4PIMfiHVBOVfCJPt8Fl9fGy48fnZEWjIrZFiUZgAUQBGR3lDw2r5fQzWDK/1 zo89zr8JLp9lcHkezNkwT5Z8UcVV3JP+MVMMV5lZ20VbH7ymYjV935FytuzQN99qbQdd crCE64lX1qt9qzTLfsWz+o4NwXKQb0e0eOMrRpsUOrGUoT8LBANB9Imj0I4SioAssq8V N/CnpWHCOhs81cc9Te8kJw3PdzK/t+cjiyszz6en2DHoXsfZ3cnxmPHjU0p3/fQaNOZp eVtd+DE/KKjCKqXns53F6DrnIF5qKQ+G4+TApEWN+PFlGxVf7xAbxWd2u9CV/QbaiSfT iG1g== X-Gm-Message-State: AOAM5330xK3GaJGCvrXMx4gTfJAqScb1DZkcmrju8hRPCXLQ3VFqy+BC osRR0zeycdUOywpgHcmIAkPuYYd0Sas= X-Google-Smtp-Source: ABdhPJw1H87Av3a++kj56yy6hngLDHD2zIZOeNKpe2/swXLGIqRvOfrvQQREPIWMLAjcwHas+qdXog== X-Received: by 2002:a1c:a98f:: with SMTP id s137mr14759118wme.5.1640647442514; Mon, 27 Dec 2021 15:24:02 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id s8sm19091559wra.9.2021.12.27.15.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 15:24:02 -0800 (PST) Message-Id: <6d89c23a248d1c11db0e92c4f06392272f00c3a2.1640647438.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 27 Dec 2021 23:23:51 +0000 Subject: [PATCH v2 05/11] i18n: tag.c factorize i18n strings MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Jeff King , Johannes Sixt , =?utf-8?b?w4Z2?= =?utf-8?b?YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?q?J?= =?utf-8?q?ean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No=C3=AB?= =?utf-8?q?l_Avila?= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Signed-off-by: Jean-Noël Avila --- builtin/tag.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/builtin/tag.c b/builtin/tag.c index 6f7cd0e3ef5..a2ab2b15304 100644 --- a/builtin/tag.c +++ b/builtin/tag.c @@ -483,6 +483,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix) OPT_END() }; int ret = 0; + const char *only_in_list = NULL; setup_ref_filter_porcelain_msg(); @@ -542,13 +543,15 @@ int cmd_tag(int argc, const char **argv, const char *prefix) goto cleanup; } if (filter.lines != -1) - die(_("-n option is only allowed in list mode")); + only_in_list = "-n"; if (filter.with_commit) - die(_("--contains option is only allowed in list mode")); + only_in_list = "--contains"; if (filter.no_commit) - die(_("--no-contains option is only allowed in list mode")); + only_in_list = "--no-contains"; if (filter.points_at.nr) - die(_("--points-at option is only allowed in list mode")); + only_in_list = "--points-at"; + if (only_in_list) + die("the '%s' option is only allowed in list mode", only_in_list); if (filter.reachable_from || filter.unreachable_from) die(_("--merged and --no-merged options are only allowed in list mode")); if (cmdmode == 'd') { From patchwork Mon Dec 27 23:23:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 12700068 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44B97C433F5 for ; Mon, 27 Dec 2021 23:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233950AbhL0XYH (ORCPT ); Mon, 27 Dec 2021 18:24:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233940AbhL0XYF (ORCPT ); Mon, 27 Dec 2021 18:24:05 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEBFCC061759 for ; Mon, 27 Dec 2021 15:24:04 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id p1-20020a1c7401000000b00345c2d068bdso9230474wmc.3 for ; Mon, 27 Dec 2021 15:24:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=fwYyPd3q8rouX4ieA3N1jpXvYi3CdJKqnyScInHyszc=; b=MFqEbR+a7SQkLVAgy2nE/MYoieV8IqVPgQt6GWVxgbfYGHtFOMf94Cw97WsPQ1QUZX 9IQZ9ihjFPPIlaQXrtvAYltQ99T9a/BnBeMZQHF7V65U2+OANa4MDoAaqWxNOi4fb7Sc WE9ovEqKZGDv4lFpZHO+mAuhB/W4JkaGHCVHcjfwO619JoGe6tTlraSBVDwP/vuAR4+s 18cml5n7IZEhVRgsXgMFiD2CBUMZX+lu0f4YHWUlCsrIqaLRQIpSgnyjy6+jsELb7s1+ tWaO8Yc0B+1ZQpnOjbjBB+hZleE8FdBqCpbt1vEgseI5/dUEkfdg9Us4G7mvPy8kbJOR TN+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=fwYyPd3q8rouX4ieA3N1jpXvYi3CdJKqnyScInHyszc=; b=y/ZuKg+vLkVAbCtVgXSLMgg4j53BsOGqB1kACBAI+3KkNajH3gYIMFlCzF3uVMQWjz AR9cFutbtYFV3dpwoTiQikjBFe8tMHDBHPfRgLPHHanc0fqQb7kOGxm2UEvl62a7g2jt bKMUUoTnY+I62rMh/sIb/gZP58lziMxthjQS55pfbz2itSmtndonhjR5yycb/0NVJDA/ 7HDVS0BjLEdUEiUpRIdrLiuBQrg5ig2l3fZ91U/eQnhsNMSdYZsFCdnoNim+esp++NyU 4ZWpolU3NM2X5MwtCmy2C1fEAfs0ZXNk30TOyABnTQsSMMXEeMW7cU19Q6yd28wHeETq 1V6g== X-Gm-Message-State: AOAM53369w2lZLr5ANQnBcZ+0CfWYadJZ29dvw41fTLx4kJg3lfI12+V fgSkjtP2yT4RSfDcNt8XP/w3+++w49Q= X-Google-Smtp-Source: ABdhPJxo01n3+kGN3GHnpVeRcTuTn2zUFOFCMoOwTH5zrBRSrgfE6pTM++PWmLDY1DYZ2uJJZEq6uA== X-Received: by 2002:a1c:9acf:: with SMTP id c198mr15136254wme.117.1640647443100; Mon, 27 Dec 2021 15:24:03 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id z6sm20100228wmp.9.2021.12.27.15.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 15:24:02 -0800 (PST) Message-Id: In-Reply-To: References: Date: Mon, 27 Dec 2021 23:23:52 +0000 Subject: [PATCH v2 06/11] i18n: factorize "--foo requires --bar" and the like MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Jeff King , Johannes Sixt , =?utf-8?b?w4Z2?= =?utf-8?b?YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?q?J?= =?utf-8?q?ean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No=C3=AB?= =?utf-8?q?l_Avila?= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Signed-off-by: Jean-Noël Avila --- archive.c | 2 +- builtin/add.c | 4 ++-- builtin/checkout.c | 2 +- builtin/commit.c | 2 +- builtin/fast-export.c | 2 +- builtin/index-pack.c | 2 +- builtin/log.c | 2 +- builtin/reset.c | 4 ++-- builtin/rm.c | 2 +- builtin/stash.c | 2 +- builtin/worktree.c | 2 +- fetch-pack.c | 2 +- http-fetch.c | 4 ++-- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/archive.c b/archive.c index 78d35467008..6fd4d951bd9 100644 --- a/archive.c +++ b/archive.c @@ -577,7 +577,7 @@ static int parse_archive_args(int argc, const char **argv, if (remote) die(_("Unexpected option --remote")); if (exec) - die(_("Option --exec can only be used together with --remote")); + die(_("%s requires %s"), "--exec", "--remote"); if (output) die(_("Unexpected option --output")); if (is_remote && args->extra_files.nr) diff --git a/builtin/add.c b/builtin/add.c index 4b2754345ad..b505eca3d4d 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -541,7 +541,7 @@ int cmd_add(int argc, const char **argv, const char *prefix) 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")); + die(_("%s requires %s"), "--ignore-missing", "--dry-run"); if (chmod_arg && ((chmod_arg[0] != '-' && chmod_arg[0] != '+') || chmod_arg[1] != 'x' || chmod_arg[2])) @@ -573,7 +573,7 @@ int cmd_add(int argc, const char **argv, const char *prefix) PATHSPEC_SYMLINK_LEADING_PATH, prefix, pathspec_from_file, pathspec_file_nul); } else if (pathspec_file_nul) { - die(_("--pathspec-file-nul requires --pathspec-from-file")); + die(_("%s requires %s"), "--pathspec-file-nul", "--pathspec-from-file"); } if (require_pathspec && pathspec.nr == 0) { diff --git a/builtin/checkout.c b/builtin/checkout.c index 2d7bfbd0f1a..d005aaad9f2 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1758,7 +1758,7 @@ static int checkout_main(int argc, const char **argv, const char *prefix, 0, prefix, opts->pathspec_from_file, opts->pathspec_file_nul); } else if (opts->pathspec_file_nul) { - die(_("--pathspec-file-nul requires --pathspec-from-file")); + die(_("%s requires %s"), "--pathspec-file-nul", "--pathspec-from-file"); } opts->pathspec.recursive = 1; diff --git a/builtin/commit.c b/builtin/commit.c index 5c1aaa42131..eb803a96ae3 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -367,7 +367,7 @@ static const char *prepare_index(const char **argv, const char *prefix, PATHSPEC_PREFER_FULL, prefix, pathspec_from_file, pathspec_file_nul); } else if (pathspec_file_nul) { - die(_("--pathspec-file-nul requires --pathspec-from-file")); + die(_("%s requires %s"), "--pathspec-file-nul", "--pathspec-from-file"); } if (!pathspec.nr && (also || (only && !allow_empty && diff --git a/builtin/fast-export.c b/builtin/fast-export.c index 1f8fe7b3ac1..a1eba9298a4 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -1254,7 +1254,7 @@ int cmd_fast_export(int argc, const char **argv, const char *prefix) usage_with_options (fast_export_usage, options); if (anonymized_seeds.cmpfn && !anonymize) - die(_("--anonymize-map without --anonymize does not make sense")); + die(_("%s requires %s"), "--anonymize-map", "--anonymize"); if (refspecs_list.nr) { int i; diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 30ce2ac746d..6845bcb41af 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1845,7 +1845,7 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix) if (!pack_name && !from_stdin) usage(index_pack_usage); if (fix_thin_pack && !from_stdin) - die(_("--fix-thin cannot be used without --stdin")); + die(_("%s requires %s"), "--fix-thin", "--stdin"); if (from_stdin && !startup_info->have_repository) die(_("--stdin requires a git repository")); if (from_stdin && hash_algo) diff --git a/builtin/log.c b/builtin/log.c index 705d58110b0..8fe51bc8afb 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -2112,7 +2112,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) if (creation_factor < 0) creation_factor = RANGE_DIFF_CREATION_FACTOR_DEFAULT; else if (!rdiff_prev) - die(_("--creation-factor requires --range-diff")); + die(_("%s requires %s"), "--creation-factor", "--range-diff"); if (rdiff_prev) { if (!cover_letter && total != 1) diff --git a/builtin/reset.c b/builtin/reset.c index 248998fd6fa..25f52ea99f6 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -432,7 +432,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix) PATHSPEC_PREFER_FULL, prefix, pathspec_from_file, pathspec_file_nul); } else if (pathspec_file_nul) { - die(_("--pathspec-file-nul requires --pathspec-from-file")); + die(_("%s requires %s"), "--pathspec-file-nul", "--pathspec-from-file"); } unborn = !strcmp(rev, "HEAD") && get_oid("HEAD", &oid); @@ -490,7 +490,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix) _(reset_type_names[reset_type])); if (intent_to_add && reset_type != MIXED) - die(_("-N can only be used with --mixed")); + die(_("%s requires %s"), "-N", "--mixed"); prepare_repo_settings(the_repository); the_repository->settings.command_requires_full_index = 0; diff --git a/builtin/rm.c b/builtin/rm.c index 3d0967cdc11..38ac3c71252 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -278,7 +278,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) PATHSPEC_PREFER_CWD, prefix, pathspec_from_file, pathspec_file_nul); } else if (pathspec_file_nul) { - die(_("--pathspec-file-nul requires --pathspec-from-file")); + die(_("%s requires %s"), "--pathspec-file-nul", "--pathspec-from-file"); } if (!pathspec.nr) diff --git a/builtin/stash.c b/builtin/stash.c index 4d793bd0b52..7ad2f9aca87 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @@ -1712,7 +1712,7 @@ static int push_stash(int argc, const char **argv, const char *prefix, PATHSPEC_PREFER_FULL | PATHSPEC_PREFIX_ORIGIN, prefix, pathspec_from_file, pathspec_file_nul); } else if (pathspec_file_nul) { - die(_("--pathspec-file-nul requires --pathspec-from-file")); + die(_("%s requires %s"), "--pathspec-file-nul", "--pathspec-from-file"); } return do_push_stash(&ps, stash_msg, quiet, keep_index, patch_mode, diff --git a/builtin/worktree.c b/builtin/worktree.c index b5ef19b2dda..bce01c8a671 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -505,7 +505,7 @@ static int add(int ac, const char **av, const char *prefix) if (!!opts.detach + !!new_branch + !!new_branch_force > 1) die(_("options '%s', '%s' and '%s' cannot be used together"), "-b", "-B", "--detach"); if (lock_reason && !keep_locked) - die(_("--reason requires --lock")); + die(_("%s requires %s"), "--reason", "--lock"); if (lock_reason) opts.keep_locked = lock_reason; else if (keep_locked) diff --git a/fetch-pack.c b/fetch-pack.c index 34987a2c30d..0a5dfea9377 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -297,7 +297,7 @@ static int find_common(struct fetch_negotiator *negotiator, struct packet_reader reader; if (args->stateless_rpc && multi_ack == 1) - die(_("--stateless-rpc requires multi_ack_detailed")); + die(_("%s requires %s"), "--stateless-rpc", "multi_ack_detailed"); packet_reader_init(&reader, fd[0], NULL, 0, PACKET_READ_CHOMP_NEWLINE | diff --git a/http-fetch.c b/http-fetch.c index c7c7d391ac5..eab45d2cc07 100644 --- a/http-fetch.c +++ b/http-fetch.c @@ -141,7 +141,7 @@ int cmd_main(int argc, const char **argv) if (packfile) { if (!index_pack_args.nr) - die(_("--packfile requires --index-pack-args")); + die(_("%s requires %s"), "--packfile", "--index-pack-args"); fetch_single_packfile(&packfile_hash, argv[arg], index_pack_args.v); @@ -150,7 +150,7 @@ int cmd_main(int argc, const char **argv) } if (index_pack_args.nr) - die(_("--index-pack-args can only be used with --packfile")); + die(_("%s requires %s"), "--index-pack-args", "--packfile"); if (commits_on_stdin) { commits = walker_targets_stdin(&commit_id, &write_ref); From patchwork Mon Dec 27 23:23:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 12700069 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9241BC43217 for ; Mon, 27 Dec 2021 23:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233970AbhL0XYN (ORCPT ); Mon, 27 Dec 2021 18:24:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233942AbhL0XYF (ORCPT ); Mon, 27 Dec 2021 18:24:05 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F436C06175A for ; Mon, 27 Dec 2021 15:24:05 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id r17so34931667wrc.3 for ; Mon, 27 Dec 2021 15:24:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=qiqOIkyPv8h8Pafi3sxUCLg26n7mS+IxX/AsWfZ1ak0=; b=O3WaYIAaPZSpoMSUMPjVBFZeBcVBmssFd8yBhiHdxevxYFj5yW/JmBLWUgYtldYX1B JaNpEsEUx+z3CiXeTZojbrAPRPgLfq07piMFMCxVcE0oT8URp9aSyF9OmZzLWdWapUa6 Ofy+YnRpwpBlPyVmKL8ShZpnDyDsY8WCclFn2VjS/MDt5c2oFslZjVCtpYc6Haz6Sn3m wB05nJI7KCLy0vqVOxP/EiPO9dI31qy66zn4vZ0zRRuit3cmc+fy3wR0LrFfy5EtUVQf c8Xj66tsy8OVSurAYVte2fGYcXAHChfBg2ErV1jPXEsQZT92VRVrJM8oOvQKNdmmE8wx iaIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=qiqOIkyPv8h8Pafi3sxUCLg26n7mS+IxX/AsWfZ1ak0=; b=TtrTmNR1Nei5/L63EoiVw794BxIHqGr5jdeFM5yhC8cH7jYu3Nm5a9jR4wzO2Uhz7a mPBim7SKQtot8hUjC2aC2Way7fxtNQBpINWzjI6868L3C0nzwxzKta8yNSpppZ5s8M5F cCG1ccDdG2uV09PVPPOzqyVP1sED4ZxH+fEfNnTl4MucEKG9sDglPslan7INwURgCNPS Y534lfptQpIbhRA4/aTDR+y0+nZ1m4lC5N4h4CY7r7VVAydLYKJZgQoVyrv3+mePbszb 2rPcrDb7IHhhsHTbJGarA8LUYRQie51mseNuzeoIQTXQRjvNrzDEtLObt+yJQwnr8XRi vq6A== X-Gm-Message-State: AOAM531ekfRzuRFW/Dqsva3hXJeeNYV4wJecV9hGPxXNtWqHBXsHglc3 Bqu3G0NA11ttmiS5mMFssvndfRKU9s4= X-Google-Smtp-Source: ABdhPJw5XPIPh994xkDQ7vQNXJv8uAILZxL4crclQSQSCanUoVGe3M5pSTbAem8N1DUIsyfZiaXAyg== X-Received: by 2002:a05:6000:188f:: with SMTP id a15mr14326951wri.153.1640647443708; Mon, 27 Dec 2021 15:24:03 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 1sm8311350wrb.13.2021.12.27.15.24.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 15:24:03 -0800 (PST) Message-Id: <2b7d558f8f99f61302b8d0b27fb33656090a6715.1640647438.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 27 Dec 2021 23:23:53 +0000 Subject: [PATCH v2 07/11] i18n: factorize "no directory given for --foo" MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Jeff King , Johannes Sixt , =?utf-8?b?w4Z2?= =?utf-8?b?YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?q?J?= =?utf-8?q?ean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No=C3=AB?= =?utf-8?q?l_Avila?= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Signed-off-by: Jean-Noël Avila --- git.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git.c b/git.c index 7edafd8ecff..7e361769ff6 100644 --- a/git.c +++ b/git.c @@ -185,7 +185,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) *envchanged = 1; } else if (!strcmp(cmd, "--git-dir")) { if (*argc < 2) { - fprintf(stderr, _("no directory given for --git-dir\n" )); + fprintf(stderr, _("no directory given for %s\n" ), "--git-dir"); usage(git_usage_string); } setenv(GIT_DIR_ENVIRONMENT, (*argv)[1], 1); @@ -213,7 +213,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) *envchanged = 1; } else if (!strcmp(cmd, "--work-tree")) { if (*argc < 2) { - fprintf(stderr, _("no directory given for --work-tree\n" )); + fprintf(stderr, _("no directory given for %s\n" ), "--work-tree"); usage(git_usage_string); } setenv(GIT_WORK_TREE_ENVIRONMENT, (*argv)[1], 1); @@ -297,7 +297,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) *envchanged = 1; } else if (!strcmp(cmd, "-C")) { if (*argc < 2) { - fprintf(stderr, _("no directory given for -C\n" )); + fprintf(stderr, _("no directory given for %s\n" ), "-C"); usage(git_usage_string); } if ((*argv)[1][0]) { From patchwork Mon Dec 27 23:23:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 12700074 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4133BC433FE for ; Mon, 27 Dec 2021 23:24:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233948AbhL0XYS (ORCPT ); Mon, 27 Dec 2021 18:24:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233945AbhL0XYG (ORCPT ); Mon, 27 Dec 2021 18:24:06 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFE42C06173E for ; Mon, 27 Dec 2021 15:24:05 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id e5so34903394wrc.5 for ; Mon, 27 Dec 2021 15:24:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=lJ3JP/DgW2qFrsjmp5khrg3BgbmcWXCzjZiWjRlHLBc=; b=Yv6N6TJ5QmC971CoLLiLi/SUA3QZEILqeGquEJ8B0r37lObBxitPbe+rLYHI3nr14g zO45ogCadvwmpVyxnfbthxhefK5mvMNzaQyb+pt6A5UeoGmJ7xiPcjZ3L8XCMwYbT/4K /LcSfw3qSF8tvRQqr9S7Jjwnb6PiemG247+OR8epfBcS39Puv2Rlx1EwRkmULkV/7Qye v5Rx+8PBwxthl1iwflSHoJCWtkcaY8wGQRA8p9Op6Vb8egrFPRRhn4JZIHQuE3LJu/dP 1RkCQCcVcXxxYcw0K88KIbwCi0NUb2QYWUtmbwvr8N5fIBguFPJ8ilfiurbUFttd86KF jZvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=lJ3JP/DgW2qFrsjmp5khrg3BgbmcWXCzjZiWjRlHLBc=; b=D/72BnAK5ngzp6KxJi+5Pmfx0kTktwlmAV0qVP+XfOINoR4MHncD3QPPy8EyprdmXR BNAu5sQIiBuPoAwzZUUfw+07mRyaWOJAzyDnNCWQef5/n1qyLe8u73H4JEDFJv8FVhmO klWJCaEmK3F8llqh5FmLVJdtKVrLhve3lMvnEFS3mGQJqwfFIIriF9nVHyZ6LXYrAiYk PjAS5PxFE5CiiSKJ+BZcwrhHqums4ApjrdAEt2o5skXgEMMQDF9dX48IT0W4V0uXsye4 hH4+mZW4UZ7E6EQKXXZI13+NJz1Y4zVBv63BXYJTuSos2zV49cmZQdXgHtR/i8e5XBCh 24KA== X-Gm-Message-State: AOAM531HKjngod3s+/Em6MkNUo3VIzFdEeWn6qluSAYDnk/idgVrXde1 3IOcCV0Uxuo65su3afn+zXcpihe2rOo= X-Google-Smtp-Source: ABdhPJyGNFGxoSKGSFU9sYmPA2tdaUDj7YM/n82NK9OKiR0428biBDrV8qij7ZrKVb2vf4jF83VG3g== X-Received: by 2002:a5d:4207:: with SMTP id n7mr13504417wrq.708.1640647444347; Mon, 27 Dec 2021 15:24:04 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id i8sm19967389wry.108.2021.12.27.15.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 15:24:04 -0800 (PST) Message-Id: <5f80ac2fa200e996d76f2394481c77f660a2c6e2.1640647438.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 27 Dec 2021 23:23:54 +0000 Subject: [PATCH v2 08/11] i18n: refactor "unrecognized %(foo) argument" strings MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Jeff King , Johannes Sixt , =?utf-8?b?w4Z2?= =?utf-8?b?YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?q?J?= =?utf-8?q?ean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No=C3=AB?= =?utf-8?q?l_Avila?= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Signed-off-by: Jean-Noël Avila --- ref-filter.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 7260fce31d0..adbcc680812 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -341,7 +341,7 @@ static int objectsize_atom_parser(struct ref_format *format, struct used_atom *a else oi.info.disk_sizep = &oi.disk_size; } else - return strbuf_addf_ret(err, -1, _("unrecognized %%(objectsize) argument: %s"), arg); + return strbuf_addf_ret(err, -1, _("unrecognized %%(%s) argument: %s"), "objectsize", arg); return 0; } @@ -374,7 +374,7 @@ static int subject_atom_parser(struct ref_format *format, struct used_atom *atom else if (!strcmp(arg, "sanitize")) atom->u.contents.option = C_SUB_SANITIZE; else - return strbuf_addf_ret(err, -1, _("unrecognized %%(subject) argument: %s"), arg); + return strbuf_addf_ret(err, -1, _("unrecognized %%(%s) argument: %s"), "subject", arg); return 0; } @@ -428,7 +428,7 @@ static int contents_atom_parser(struct ref_format *format, struct used_atom *ato if (strtoul_ui(arg, 10, &atom->u.contents.nlines)) return strbuf_addf_ret(err, -1, _("positive value expected contents:lines=%s"), arg); } else - return strbuf_addf_ret(err, -1, _("unrecognized %%(contents) argument: %s"), arg); + return strbuf_addf_ret(err, -1, _("unrecognized %%(%s) argument: %s"), "contents", arg); return 0; } @@ -440,7 +440,7 @@ static int raw_atom_parser(struct ref_format *format, struct used_atom *atom, else if (!strcmp(arg, "size")) atom->u.raw_data.option = RAW_LENGTH; else - return strbuf_addf_ret(err, -1, _("unrecognized %%(raw) argument: %s"), arg); + return strbuf_addf_ret(err, -1, _("unrecognized %%(%s) argument: %s"), "raw", arg); return 0; } @@ -459,7 +459,7 @@ static int oid_atom_parser(struct ref_format *format, struct used_atom *atom, if (atom->u.oid.length < MINIMUM_ABBREV) atom->u.oid.length = MINIMUM_ABBREV; } else - return strbuf_addf_ret(err, -1, _("unrecognized argument '%s' in %%(%s)"), arg, atom->name); + return strbuf_addf_ret(err, -1, _("unrecognized %%(%s) argument: %s"), atom->name, arg); return 0; } @@ -531,7 +531,7 @@ static int align_atom_parser(struct ref_format *format, struct used_atom *atom, else if ((position = parse_align_position(s)) >= 0) align->position = position; else { - strbuf_addf(err, _("unrecognized %%(align) argument: %s"), s); + strbuf_addf(err, _("unrecognized %%(%s) argument: %s"), "align", s); string_list_clear(¶ms, 0); return -1; } @@ -557,7 +557,7 @@ static int if_atom_parser(struct ref_format *format, struct used_atom *atom, } else if (skip_prefix(arg, "notequals=", &atom->u.if_then_else.str)) { atom->u.if_then_else.cmp_status = COMPARE_UNEQUAL; } else - return strbuf_addf_ret(err, -1, _("unrecognized %%(if) argument: %s"), arg); + return strbuf_addf_ret(err, -1, _("unrecognized %%(%s) argument: %s"), "if", arg); return 0; } From patchwork Mon Dec 27 23:23:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 12700073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2852CC43217 for ; Mon, 27 Dec 2021 23:24:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234012AbhL0XYQ (ORCPT ); Mon, 27 Dec 2021 18:24:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233948AbhL0XYH (ORCPT ); Mon, 27 Dec 2021 18:24:07 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60168C061401 for ; Mon, 27 Dec 2021 15:24:06 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id q16so34902669wrg.7 for ; Mon, 27 Dec 2021 15:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=HJowCI4wG8/H+dbje6h72gIFs/0u9CrYeRicZUF2+Ao=; b=YqT1exGSQhURw+U/pnmG282ZIParPUrMsncjdUPi0hz/L+P/MEZOOrCRzg5bltDTQQ 0yXGwIek7SB2LFmAbNkpRs9UUprATVtrgH0l67UQf5pvqfSKQnRuM4cZ6QNCrbcrDGhY ZXuzG/yZE8nK/Fo+kKBOjRSwKM/MrjyYFQjqaJD00Yv7sjTFKNMVhP776uHYcjs4YYGP 9DeFlO+HSca3cU4Rwc2kMCqpIusaCZsqf2bupRSQ4cihFnfMtASFkqYMSZf/6qYrWVq6 W2EXob8cz04zK2OC2MCUQbwY+8VuNM39XDq2kvqobKUZUEhvCgW4z4v2Lq/MVwIjWtoc b8xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=HJowCI4wG8/H+dbje6h72gIFs/0u9CrYeRicZUF2+Ao=; b=ezSPcwSAauCiu62PrkASdD8MfSkyrZtjyOqLk+Wh/4p8nfOrJlhmQOFxYu4h6iABPH CyfsDmMIaYX7fGL1bqtS2KOaQr4IHOUaPxj5fKUSTi1qD6MwS5ZmRi3058CeZNYE/gfQ 27j+di7KgTY9rNIcm7LcfXE1jTaNkg8etZeX9qokAuHapsuc6R+8ce+k4Y+rBaIHh1tq 7raS6jWzNjGjr0Cl3o6Ka5+OGeLI6k5zKD1gIm4TXnyP6zv29GGqlRbn5BKCxg0FbZZx e8bEeE9W36k1QWkyQYIvK1KJmfKrbcXCR2krQsdSbJ8iERokuSuP0nWrar4FhKCNglF3 I0iQ== X-Gm-Message-State: AOAM532xYZV/sZMJpFvgU9DflDoCilgOsALWi2Hc0HgmIi3pZmIT6Cp8 vb10GhOw3iyv6X+01Sd8EteOR4cNe8Q= X-Google-Smtp-Source: ABdhPJwEXIQ3ARyhs53wST7XxTiEtF14yfHDA6IggXEggxKNtcC3XsdpA7XKLnHtx6PNYTwkbKvGIQ== X-Received: by 2002:a05:6000:186a:: with SMTP id d10mr14372947wri.347.1640647444856; Mon, 27 Dec 2021 15:24:04 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id u12sm16287648wrf.60.2021.12.27.15.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 15:24:04 -0800 (PST) Message-Id: <9dd53960c425ee82bd5541850f7ebc21fa8efed4.1640647438.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 27 Dec 2021 23:23:55 +0000 Subject: [PATCH v2 09/11] i18n: factorize "--foo outside a repository" MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Jeff King , Johannes Sixt , =?utf-8?b?w4Z2?= =?utf-8?b?YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?q?J?= =?utf-8?q?ean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No=C3=AB?= =?utf-8?q?l_Avila?= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Signed-off-by: Jean-Noël Avila --- apply.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apply.c b/apply.c index 000f2a9b1b3..8fd2ac2cfca 100644 --- a/apply.c +++ b/apply.c @@ -136,7 +136,7 @@ int check_apply_state(struct apply_state *state, int force_apply) 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")); + return error(_("%s outside a repository"), "--3way"); state->check_index = 1; } if (state->apply_with_reject) { @@ -147,10 +147,10 @@ int check_apply_state(struct apply_state *state, int force_apply) if (!force_apply && (state->diffstat || state->numstat || state->summary || state->check || state->fake_ancestor)) state->apply = 0; if (state->check_index && is_not_gitdir) - return error(_("--index outside a repository")); + return error(_("%s outside a repository"), "--index"); if (state->cached) { if (is_not_gitdir) - return error(_("--cached outside a repository")); + return error(_("%s outside a repository"), "--cached"); state->check_index = 1; } if (state->ita_only && (state->check_index || is_not_gitdir)) From patchwork Mon Dec 27 23:23:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 12700072 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 172A0C433F5 for ; Mon, 27 Dec 2021 23:24:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233985AbhL0XYQ (ORCPT ); Mon, 27 Dec 2021 18:24:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233952AbhL0XYH (ORCPT ); Mon, 27 Dec 2021 18:24:07 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E750EC061759 for ; Mon, 27 Dec 2021 15:24:06 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id bg19-20020a05600c3c9300b0034565e837b6so5777228wmb.1 for ; Mon, 27 Dec 2021 15:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=rP4kEq8FF2OINWVr/x+I8nI+cifT9FovCOINQK1WOY0=; b=U6SRImApnNntTfJ4KViCZdsY5rAPbJ7ZMN0rLZUYb1cNtXcQ2jvvFmqW0yu2pz2Xx6 hRJmVjQafJZr/ASuM89rLkxhU58m86r93beQtp5cZdghgMkAPgruraKcSd1OA0yL/mqP SsIB9wnOEiK+sFxQgoyRGiZUXj2jW5N3xn8wzJgrubAzsyXi7DjK8KgSDPw0ul4zzQZT k++usNIpjhqrHVnyGEuBwBJddKU/etDc0YkPG2Kl/dllYgNQs6OCnhCnGWz3Ia4t7FuJ IIFr7r1JP95y3dQZD0bccIXBiAiuoWngWFjd5Tjy9tRXwa9m0iVRAVYdrGYWqvcKjNmR VCTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=rP4kEq8FF2OINWVr/x+I8nI+cifT9FovCOINQK1WOY0=; b=KfKSbeCDxVSM9nIO/x2ukIHJDdCSh93bgc3aDAM8DUGvXSCYxd+VOWknYPvogriTyz QcbPnL7ZyKloHqjcwGzh1GLKbgxavY68bLHTwnpQkA66XtphFXzCjkice8RxMMMwR+wX 6gCTgDAQ7FeMWydxBHA9dnjlK6a0KII3yAz0DEziLiz2kONab4zEAsT0Q+cZEHj7pYrV zHgZbx22tCEsdwceswqY01vZu9qInN2VjkJ8aZOWIEPkHRhEROwczPy65nSmhMC2Dmne qClv29YjO3nVfQ2J89P3Fy7lIF7xEs+6nMAsAfl9svJVrYN8R7WmDPq5KioycNmJ5PDm u29Q== X-Gm-Message-State: AOAM531Egsp3qCuWZLGoPZqg+f2vCMsC7C7XJlo0p4Sz9ivrBvcQfU2a RWe0lGZuM9HcB/fSuzS8YhVpauvWNoA= X-Google-Smtp-Source: ABdhPJwYbIcHIRFB791hqda3XB3t4ufdqU3AjNWBUsYma7MkiZPBmOMf6wv9pWSF8aRTJVXJx7jZQw== X-Received: by 2002:a05:600c:4f8d:: with SMTP id n13mr14677050wmq.43.1640647445458; Mon, 27 Dec 2021 15:24:05 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id m21sm15671552wrb.2.2021.12.27.15.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 15:24:05 -0800 (PST) Message-Id: In-Reply-To: References: Date: Mon, 27 Dec 2021 23:23:56 +0000 Subject: [PATCH v2 10/11] i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Jeff King , Johannes Sixt , =?utf-8?b?w4Z2?= =?utf-8?b?YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?q?J?= =?utf-8?q?ean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No=C3=AB?= =?utf-8?q?l_Avila?= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Signed-off-by: Jean-Noël Avila --- ref-filter.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index adbcc680812..f7a2f17bfd9 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -841,7 +841,7 @@ static void if_then_else_handler(struct ref_formatting_stack **stack) struct if_then_else *if_then_else = (struct if_then_else *)cur->at_end_data; if (!if_then_else->then_atom_seen) - die(_("format: %%(if) atom used without a %%(then) atom")); + die(_("format: %%(%s) atom used without a %%(%s) atom"), "if", "then"); if (if_then_else->else_atom_seen) { /* @@ -907,7 +907,7 @@ static int then_atom_handler(struct atom_value *atomv, struct ref_formatting_sta if (cur->at_end == if_then_else_handler) if_then_else = (struct if_then_else *)cur->at_end_data; if (!if_then_else) - return strbuf_addf_ret(err, -1, _("format: %%(then) atom used without an %%(if) atom")); + return strbuf_addf_ret(err, -1, _("format: %%(%s) atom used without a %%(%s) atom"), "then", "if"); if (if_then_else->then_atom_seen) return strbuf_addf_ret(err, -1, _("format: %%(then) atom used more than once")); if (if_then_else->else_atom_seen) @@ -943,9 +943,9 @@ static int else_atom_handler(struct atom_value *atomv, struct ref_formatting_sta if (prev->at_end == if_then_else_handler) if_then_else = (struct if_then_else *)prev->at_end_data; if (!if_then_else) - return strbuf_addf_ret(err, -1, _("format: %%(else) atom used without an %%(if) atom")); + return strbuf_addf_ret(err, -1, _("format: %%(%s) atom used without a %%(%s) atom"), "else", "if"); if (!if_then_else->then_atom_seen) - return strbuf_addf_ret(err, -1, _("format: %%(else) atom used without a %%(then) atom")); + return strbuf_addf_ret(err, -1, _("format: %%(%s) atom used without a %%(%s) atom"), "else", "then"); if (if_then_else->else_atom_seen) return strbuf_addf_ret(err, -1, _("format: %%(else) atom used more than once")); if_then_else->else_atom_seen = 1; From patchwork Mon Dec 27 23:23:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jean-No=C3=ABl_Avila?= X-Patchwork-Id: 12700075 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C06BC433EF for ; Mon, 27 Dec 2021 23:24:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233987AbhL0XYT (ORCPT ); Mon, 27 Dec 2021 18:24:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233956AbhL0XYI (ORCPT ); Mon, 27 Dec 2021 18:24:08 -0500 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5B6BC06175A for ; Mon, 27 Dec 2021 15:24:07 -0800 (PST) Received: by mail-wm1-x335.google.com with SMTP id a83-20020a1c9856000000b00344731e044bso9086979wme.1 for ; Mon, 27 Dec 2021 15:24:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=5xXE1y5fHc7zTyQRw4sNfZGOMKdqmjnOH+aHFCkNR14=; b=pNddQglp56jP4QzfQQt6XGSD2hOfK8Ao2TqUUQubdVaaxgdHPFcHPQtkTY4gRm8NSw k+M9iVLmocDA1vj6TXCWQWfTkK8k4nfTwGCWYLsURPFeFtExwPAgGCKDxuikezjXwlGs 2ZjMYNM+0uRmpwylPx2XG7eLB7vxaLFn+bB4ge23iRy2UtISpromMYJz2wTstlXOHMFw LwYvJFwioURm5mmxQR84/yr+1GpXh4r95DC9vkGNzTUps/zg7vHd8SY571ly1AhnrxYE vYsSg4rGnHz75a0z1Qo2tHjN0WWsM1VRzbtJbCKLdI3UVgKj5hwYEFkXwtouUjmO4adI 9oOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=5xXE1y5fHc7zTyQRw4sNfZGOMKdqmjnOH+aHFCkNR14=; b=PEO5WgVpYRuEznsmphe4ZGqaYoINM2aGfy8ldkWAEQwJ0q18roVB6fmN8X2NLmUAVB sN8FvICC+e4O8gv9hGnlhETE0Xsk9JGWkn9wp0M2cq88CyCW7INZCvNzedpYX1OyGR9k HLyOFENkTeybDbgyJgS/BHPEh4XMomhURgG/QzO8n89h0yosvZMuop2aTS968MFdHuhB UPhVQRZCCzKibSDIAgGyZ7/CZjO27WTWJvTBtipgd15OhUVnYbdRg+oifEimiVgm7r44 QqKcpIPiKmeHuoeivRUB2NQIXWH3Kize55ubNutLG5elS74RonPDKF+fbksCvLmh9lhv 0nXg== X-Gm-Message-State: AOAM531kYdOANRH2h2ZygOLvZxeEUKHq1r7pZAIDwmahDYQbznnc3fL4 SCp7c4BUzfhsqAdbbDFw9h7kdnvkKZg= X-Google-Smtp-Source: ABdhPJxYuStb95tMtZ33uMFv0j/2U4OcCiXh/3/b/U4YceKKlv4r/JAt6HmgZ8rTJwlJtdNbhWRi8A== X-Received: by 2002:a1c:f012:: with SMTP id a18mr14578281wmb.73.1640647445999; Mon, 27 Dec 2021 15:24:05 -0800 (PST) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id l8sm16940851wrv.25.2021.12.27.15.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 15:24:05 -0800 (PST) Message-Id: <89066f01f32eb4ef8d6ea97aadda21cb36cbb6f2.1640647438.git.gitgitgadget@gmail.com> In-Reply-To: References: Date: Mon, 27 Dec 2021 23:23:57 +0000 Subject: [PATCH v2 11/11] i18n: turn even more messages into "cannot be used together" ones MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Jeff King , Johannes Sixt , =?utf-8?b?w4Z2?= =?utf-8?b?YXIgQXJuZmrDtnLDsA==?= Bjarmason , =?utf-8?q?J?= =?utf-8?q?ean-No=C3=ABl?= Avila , =?utf-8?q?Jean-No=C3=AB?= =?utf-8?q?l_Avila?= Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: =?utf-8?q?Jean-No=C3=ABl_Avila?= From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= Even if some of these messages are not subject to gettext i18n, this helps bring a single style of message for a given error type. Signed-off-by: Jean-Noël Avila --- builtin/add.c | 2 +- builtin/am.c | 4 ++-- builtin/cat-file.c | 2 +- builtin/checkout.c | 4 ++-- builtin/clone.c | 2 +- builtin/commit.c | 10 ++++++---- builtin/describe.c | 4 ++-- builtin/init-db.c | 2 +- builtin/rebase.c | 4 ++-- builtin/reset.c | 2 +- builtin/rev-list.c | 2 +- builtin/rm.c | 2 +- builtin/stash.c | 2 +- diff.c | 6 +++--- t/t0001-init.sh | 4 ++-- t/t2026-checkout-pathspec-file.sh | 2 +- t/t2072-restore-pathspec-file.sh | 2 +- t/t3431-rebase-fork-point.sh | 2 +- t/t3601-rm-pathspec-file.sh | 2 +- t/t3704-add-pathspec-file.sh | 2 +- t/t3909-stash-pathspec-file.sh | 2 +- t/t4209-log-pickaxe.sh | 4 ++-- t/t5606-clone-options.sh | 2 +- t/t7107-reset-pathspec-file.sh | 2 +- t/t7500-commit-template-squash-signoff.sh | 11 ++++++----- t/t7526-commit-pathspec-file.sh | 4 ++-- 26 files changed, 45 insertions(+), 42 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index b505eca3d4d..ded15ca6eac 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -566,7 +566,7 @@ int cmd_add(int argc, const char **argv, const char *prefix) if (pathspec_from_file) { if (pathspec.nr) - die(_("--pathspec-from-file is incompatible with pathspec arguments")); + die(_("'--pathspec-from-file' and pathspec arguments cannot be used together")); parse_pathspec_file(&pathspec, PATHSPEC_ATTR, PATHSPEC_PREFER_FULL | diff --git a/builtin/am.c b/builtin/am.c index 8677ea2348a..be0e32f69cf 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -2230,8 +2230,8 @@ static int parse_opt_show_current_patch(const struct option *opt, const char *ar } if (resume->mode == RESUME_SHOW_PATCH && new_value != resume->sub_mode) - return error(_("--show-current-patch=%s is incompatible with " - "--show-current-patch=%s"), + return error(_("options '--show-current-patch=%s' and '--show-current-patch=%s' " + "cannot used together"), arg, valid_modes[resume->sub_mode]); resume->mode = RESUME_SHOW_PATCH; diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 86fc03242b8..400ceaba5e8 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -729,7 +729,7 @@ int cmd_cat_file(int argc, const char **argv, const char *prefix) } if (force_path && batch.enabled) { - error("--path= incompatible with --batch"); + error("'--path=' and '--batch' cannot be used together"); usage_with_options(cat_file_usage, options); } diff --git a/builtin/checkout.c b/builtin/checkout.c index d005aaad9f2..e83684a58b9 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -1635,7 +1635,7 @@ static int checkout_main(int argc, const char **argv, const char *prefix, } if ((!!opts->new_branch + !!opts->new_branch_force + !!opts->new_orphan_branch) > 1) - die(_("-%c, -%c and --orphan are mutually exclusive"), + die(_("options '-%c', '-%c' and '--orphan' cannot be used together"), cb_option, toupper(cb_option)); if (opts->overlay_mode == 1 && opts->patch_mode) @@ -1746,7 +1746,7 @@ static int checkout_main(int argc, const char **argv, const char *prefix, if (opts->pathspec_from_file) { if (opts->pathspec.nr) - die(_("--pathspec-from-file is incompatible with pathspec arguments")); + die(_("'--pathspec-from-file' and pathspec arguments cannot be used together")); if (opts->force_detach) die(_("options '%s' and '%s' cannot be used together"), "--pathspec-from-file", "--detach"); diff --git a/builtin/clone.c b/builtin/clone.c index 13bdbe14b2f..cc92393e4a5 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -900,7 +900,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) if (option_bare) { if (option_origin) - die(_("--bare and --origin %s options are incompatible."), + die(_("options '--bare' and '--origin %s' cannot be used together"), option_origin); if (real_git_dir) die(_("options '%s' and '%s' cannot be used together"), "--bare", "--separate-git-dir"); diff --git a/builtin/commit.c b/builtin/commit.c index eb803a96ae3..fa454ea9421 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -361,7 +361,7 @@ static const char *prepare_index(const char **argv, const char *prefix, 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")); + die(_("'--pathspec-from-file' and pathspec arguments cannot be used together")); parse_pathspec_file(&pathspec, 0, PATHSPEC_PREFER_FULL, @@ -799,7 +799,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix, if (!strcmp(fixup_prefix, "amend")) { if (have_option_m) - die(_("cannot combine -m with --fixup:%s"), fixup_message); + die(_("options '-m' and '--fixup:%s' cannot be used together"), fixup_message); prepare_amend_commit(commit, &sb, &ctx); } } else if (!stat(git_path_merge_msg(the_repository), &statbuf)) { @@ -1229,9 +1229,11 @@ static void check_fixup_reword_options(int argc, const char *argv[]) { die(_("You are in the middle of a cherry-pick -- cannot reword.")); } if (argc) - die(_("cannot combine reword option of --fixup with path '%s'"), *argv); + die(_("reword option of --fixup and path '%s' cannot be used together"), *argv); if (patch_interactive || interactive || all || also || only) - die(_("reword option of --fixup is mutually exclusive with --patch/--interactive/--all/--include/--only")); + die(_("reword option of --fixup and " + "--patch/--interactive/--all/--include/--only " + "cannot be used together")); } static int parse_and_validate_options(int argc, const char *argv[], diff --git a/builtin/describe.c b/builtin/describe.c index fd5ba1fc604..130b87b3a34 100644 --- a/builtin/describe.c +++ b/builtin/describe.c @@ -670,9 +670,9 @@ int cmd_describe(int argc, const char **argv, const char *prefix) } describe("HEAD", 1); } else if (dirty) { - die(_("--dirty is incompatible with commit-ishes")); + die(_("'%s' and commit-ishes cannot be used together"), "--dirty"); } else if (broken) { - die(_("--broken is incompatible with commit-ishes")); + die(_("'%s' and commit-ishes cannot be used together"), "--broken"); } else { while (argc-- > 0) describe(*argv++, argc == 0); diff --git a/builtin/init-db.c b/builtin/init-db.c index 546f9c595e7..b85dffbdf5c 100644 --- a/builtin/init-db.c +++ b/builtin/init-db.c @@ -681,7 +681,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix) } else { if (real_git_dir) - die(_("--separate-git-dir incompatible with bare repository")); + die(_("'--separate-git-dir' and bare repository cannot be used together")); if (work_tree) set_git_work_tree(work_tree); } diff --git a/builtin/rebase.c b/builtin/rebase.c index ed326b8aecc..d3ce0999786 100644 --- a/builtin/rebase.c +++ b/builtin/rebase.c @@ -1460,8 +1460,8 @@ int cmd_rebase(int argc, const char **argv, const char *prefix) if (i >= 0) { if (is_merge(&options)) - die(_("cannot combine apply options with " - "merge options")); + die(_("apply options and merge options " + "cannot be used together")); else options.type = REBASE_APPLY; } diff --git a/builtin/reset.c b/builtin/reset.c index 25f52ea99f6..9fba34addf4 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -426,7 +426,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix) 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")); + die(_("'--pathspec-from-file' and pathspec arguments cannot be used together")); parse_pathspec_file(&pathspec, 0, PATHSPEC_PREFER_FULL, diff --git a/builtin/rev-list.c b/builtin/rev-list.c index de60cbdbc9d..0e3d93afed3 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -676,7 +676,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) if (revs.count && (revs.tag_objects || revs.tree_objects || revs.blob_objects) && (revs.left_right || revs.cherry_mark)) - die(_("marked counting is incompatible with --objects")); + die(_("marked counting and '--objects' cannot be used together")); save_commit_buffer = (revs.verbose_header || revs.grep_filter.pattern_list || diff --git a/builtin/rm.c b/builtin/rm.c index 38ac3c71252..7f1cd6a33f8 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -272,7 +272,7 @@ int cmd_rm(int argc, const char **argv, const char *prefix) if (pathspec_from_file) { if (pathspec.nr) - die(_("--pathspec-from-file is incompatible with pathspec arguments")); + die(_("'--pathspec-from-file' and pathspec arguments cannot be used together")); parse_pathspec_file(&pathspec, 0, PATHSPEC_PREFER_CWD, diff --git a/builtin/stash.c b/builtin/stash.c index 7ad2f9aca87..242be3eb7e8 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @@ -1706,7 +1706,7 @@ static int push_stash(int argc, const char **argv, const char *prefix, 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")); + die(_("'--pathspec-from-file' and pathspec arguments cannot be used together")); parse_pathspec_file(&ps, 0, PATHSPEC_PREFER_FULL | PATHSPEC_PREFIX_ORIGIN, diff --git a/diff.c b/diff.c index 8de1c49763c..ba2a886ec2c 100644 --- a/diff.c +++ b/diff.c @@ -4639,16 +4639,16 @@ void diff_setup_done(struct diff_options *options) options->set_default(options); if (HAS_MULTI_BITS(options->output_format & check_mask)) - die(_("--name-only, --name-status, --check and -s are mutually exclusive")); + die(_("options '--name-only', '--name-status', '--check' and '-s' cannot be used together")); if (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_MASK)) 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")); + die(_("-G and --pickaxe-regex cannot be used together, use --pickaxe-regex with -S")); if (HAS_MULTI_BITS(options->pickaxe_opts & DIFF_PICKAXE_KINDS_ALL_OBJFIND_MASK)) - die(_("--pickaxe-all and --find-object are mutually exclusive, use --pickaxe-all with -G and -S")); + die(_("--pickaxe-all and --find-object cannot be used together, use --pickaxe-all with -G and -S")); /* * Most of the time we can say "there are changes" diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 3235ab4d53c..7d8bae09c25 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -339,7 +339,7 @@ test_expect_success 'implicit bare & --separate-git-dir incompatible' ' mkdir -p bare.git && test_must_fail env GIT_DIR=. \ git -C bare.git init --separate-git-dir goop.git 2>err && - test_i18ngrep "incompatible" err + test_i18ngrep "cannot be used together" err ' test_expect_success 'bare & --separate-git-dir incompatible within worktree' ' @@ -348,7 +348,7 @@ test_expect_success 'bare & --separate-git-dir incompatible within worktree' ' git clone --bare . bare.git && git -C bare.git worktree add --detach ../linkwt && test_must_fail git -C linkwt init --separate-git-dir seprepo 2>err && - test_i18ngrep "incompatible" err + test_i18ngrep "cannot be used together" err ' test_lazy_prereq GETCWD_IGNORES_PERMS ' diff --git a/t/t2026-checkout-pathspec-file.sh b/t/t2026-checkout-pathspec-file.sh index fbe26de2f90..2bd8cd74206 100755 --- a/t/t2026-checkout-pathspec-file.sh +++ b/t/t2026-checkout-pathspec-file.sh @@ -155,7 +155,7 @@ test_expect_success 'error conditions' ' 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 && + test_i18ngrep -e ".--pathspec-from-file. and pathspec arguments cannot be used together" err && test_must_fail git checkout --pathspec-file-nul 2>err && test_i18ngrep -e "--pathspec-file-nul requires --pathspec-from-file" err diff --git a/t/t2072-restore-pathspec-file.sh b/t/t2072-restore-pathspec-file.sh index ad1fc0ed071..4f7e9d47d28 100755 --- a/t/t2072-restore-pathspec-file.sh +++ b/t/t2072-restore-pathspec-file.sh @@ -155,7 +155,7 @@ test_expect_success 'error conditions' ' 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 && + test_i18ngrep -e ".--pathspec-from-file. and pathspec arguments cannot be used together" err && test_must_fail git restore --pathspec-file-nul --source=HEAD^1 2>err && test_i18ngrep -e "--pathspec-file-nul requires --pathspec-from-file" err && diff --git a/t/t3431-rebase-fork-point.sh b/t/t3431-rebase-fork-point.sh index 4c98d99e7e8..1d0b15380ed 100755 --- a/t/t3431-rebase-fork-point.sh +++ b/t/t3431-rebase-fork-point.sh @@ -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' ' diff --git a/t/t3601-rm-pathspec-file.sh b/t/t3601-rm-pathspec-file.sh index b2a8db69afc..b6ebde4e572 100755 --- a/t/t3601-rm-pathspec-file.sh +++ b/t/t3601-rm-pathspec-file.sh @@ -67,7 +67,7 @@ test_expect_success 'error conditions' ' echo fileA.t >list && test_must_fail git rm --pathspec-from-file=list -- fileA.t 2>err && - test_i18ngrep -e "--pathspec-from-file is incompatible with pathspec arguments" err && + test_i18ngrep -e ".--pathspec-from-file. and pathspec arguments cannot be used together" err && test_must_fail git rm --pathspec-file-nul 2>err && test_i18ngrep -e "--pathspec-file-nul requires --pathspec-from-file" err && diff --git a/t/t3704-add-pathspec-file.sh b/t/t3704-add-pathspec-file.sh index 7e17ae80229..38a22efcdda 100755 --- a/t/t3704-add-pathspec-file.sh +++ b/t/t3704-add-pathspec-file.sh @@ -147,7 +147,7 @@ test_expect_success 'error conditions' ' 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 && + test_i18ngrep -e ".--pathspec-from-file. and pathspec arguments cannot be used together" err && test_must_fail git add --pathspec-file-nul 2>err && test_i18ngrep -e "--pathspec-file-nul requires --pathspec-from-file" err && diff --git a/t/t3909-stash-pathspec-file.sh b/t/t3909-stash-pathspec-file.sh index aae2b25f766..43ddf051240 100755 --- a/t/t3909-stash-pathspec-file.sh +++ b/t/t3909-stash-pathspec-file.sh @@ -91,7 +91,7 @@ test_expect_success 'error conditions' ' 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 && + test_i18ngrep -e ".--pathspec-from-file. and pathspec arguments cannot be used together" err && test_must_fail git stash push --pathspec-file-nul 2>err && test_i18ngrep -e "--pathspec-file-nul requires --pathspec-from-file" err diff --git a/t/t4209-log-pickaxe.sh b/t/t4209-log-pickaxe.sh index 4f820f8597d..7f6bb27f141 100755 --- a/t/t4209-log-pickaxe.sh +++ b/t/t4209-log-pickaxe.sh @@ -72,12 +72,12 @@ test_expect_success 'usage' ' grep "cannot be used together" err && test_expect_code 128 git log --pickaxe-all --find-object=HEAD 2>err && - grep "mutually exclusive" err + grep "cannot be used together" err ' test_expect_success 'usage: --pickaxe-regex' ' test_expect_code 128 git log -Gregex --pickaxe-regex 2>err && - grep "mutually exclusive" err + grep "cannot be used together" err ' test_expect_success 'usage: --no-pickaxe-regex' ' diff --git a/t/t5606-clone-options.sh b/t/t5606-clone-options.sh index 3af3577af0b..8f676d6b0c0 100755 --- a/t/t5606-clone-options.sh +++ b/t/t5606-clone-options.sh @@ -46,7 +46,7 @@ test_expect_success 'disallows --bare with --origin' ' test_must_fail git clone -o foo --bare parent clone-bare-o 2>err && test_debug "cat err" && - test_i18ngrep -e "--bare and --origin foo options are incompatible" err + test_i18ngrep -e "options .--bare. and .--origin foo. cannot be used together" err ' diff --git a/t/t7107-reset-pathspec-file.sh b/t/t7107-reset-pathspec-file.sh index b211fbc0a52..880adf79742 100755 --- a/t/t7107-reset-pathspec-file.sh +++ b/t/t7107-reset-pathspec-file.sh @@ -163,7 +163,7 @@ test_expect_success 'error conditions' ' 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 && + test_i18ngrep -e ".--pathspec-from-file. and pathspec arguments cannot be used together" err && test_must_fail git reset --pathspec-file-nul 2>err && test_i18ngrep -e "--pathspec-file-nul requires --pathspec-from-file" err && diff --git a/t/t7500-commit-template-squash-signoff.sh b/t/t7500-commit-template-squash-signoff.sh index 8dd0f988129..2da97f479fe 100755 --- a/t/t7500-commit-template-squash-signoff.sh +++ b/t/t7500-commit-template-squash-signoff.sh @@ -359,14 +359,14 @@ test_expect_success '--fixup=reword: ignores staged changes' ' test_expect_success '--fixup=reword: error out with -m option' ' commit_for_rebase_autosquash_setup && - echo "fatal: cannot combine -m with --fixup:reword" >expect && + echo "fatal: options '\''-m'\'' and '\''--fixup:reword'\'' cannot be used together" >expect && test_must_fail git commit --fixup=reword:HEAD~ -m "reword commit message" 2>actual && test_cmp expect actual ' test_expect_success '--fixup=amend: error out with -m option' ' commit_for_rebase_autosquash_setup && - echo "fatal: cannot combine -m with --fixup:amend" >expect && + echo "fatal: options '\''-m'\'' and '\''--fixup:amend'\'' cannot be used together" >expect && test_must_fail git commit --fixup=amend:HEAD~ -m "amend commit message" 2>actual && test_cmp expect actual ' @@ -421,8 +421,9 @@ test_expect_success 'amend! commit allows empty commit msg body with --allow-emp test_fixup_reword_opt () { test_expect_success "--fixup=reword: incompatible with $1" " - echo 'fatal: reword option of --fixup is mutually exclusive with'\ - '--patch/--interactive/--all/--include/--only' >expect && + echo 'fatal: reword option of --fixup and'\ + '--patch/--interactive/--all/--include/--only'\ + 'cannot be used together' >expect && test_must_fail git commit --fixup=reword:HEAD~ $1 2>actual && test_cmp expect actual " @@ -435,7 +436,7 @@ done test_expect_success '--fixup=reword: give error with pathsec' ' commit_for_rebase_autosquash_setup && - echo "fatal: cannot combine reword option of --fixup with path '\''foo'\''" >expect && + echo "fatal: reword option of --fixup and path '\''foo'\'' cannot be used together" >expect && test_must_fail git commit --fixup=reword:HEAD~ -- foo 2>actual && test_cmp expect actual ' diff --git a/t/t7526-commit-pathspec-file.sh b/t/t7526-commit-pathspec-file.sh index fb5857b2a13..b6013a1f742 100755 --- a/t/t7526-commit-pathspec-file.sh +++ b/t/t7526-commit-pathspec-file.sh @@ -147,10 +147,10 @@ test_expect_success 'error conditions' ' 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 ".--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 && + test_i18ngrep -e ".--pathspec-from-file. and pathspec arguments cannot be used together" err && test_must_fail git commit --pathspec-file-nul -m "Commit" 2>err && test_i18ngrep -e "--pathspec-file-nul requires --pathspec-from-file" err &&