From: "René Scharfe" <l.s.r@web.de>
To: git@vger.kernel.org
Subject: [PATCH 7/7] worktree: simplify incompatibility message for --orphan and commit-ish
Date: Wed, 6 Dec 2023 12:52:01 +0100 [thread overview]
Message-ID: <20231206115215.94467-8-l.s.r@web.de> (raw)
In-Reply-To: <20231206115215.94467-1-l.s.r@web.de>
Use a single translatable string to report that the worktree add option
--orphan is incompatible with a commit-ish instead of having the
commit-ish in a separate translatable string. This reduces the number
of strings to translate and gives translators the full context.
A similar message is used in builtin/describe.c, but with the plural of
commit-ish, and here we need the singular form.
Signed-off-by: René Scharfe <l.s.r@web.de>
---
builtin/worktree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 036ceaa981..4ac1621541 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -815,8 +815,8 @@ static int add(int ac, const char **av, const char *prefix)
die(_("options '%s' and '%s' cannot be used together"),
"--orphan", "--no-checkout");
if (opts.orphan && ac == 2)
- die(_("'%s' and '%s' cannot be used together"), "--orphan",
- _("<commit-ish>"));
+ die(_("option '%s' and commit-ish cannot be used together"),
+ "--orphan");
if (lock_reason && !keep_locked)
die(_("the option '%s' requires '%s'"), "--reason", "--lock");
if (lock_reason)
--
2.43.0
next prev parent reply other threads:[~2023-12-06 11:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 11:51 [PATCH 0/7] standardize incompatibility messages René Scharfe
2023-12-06 11:51 ` [PATCH 1/7] push: use die_for_incompatible_opt4() for --delete/--tags/--all/--mirror René Scharfe
2023-12-06 11:51 ` [PATCH 2/7] repack: use die_for_incompatible_opt3() for -A/-k/--cruft René Scharfe
2023-12-06 19:18 ` Taylor Blau
2023-12-06 11:51 ` [PATCH 3/7] revision: use die_for_incompatible_opt3() for --graph/--reverse/--walk-reflogs René Scharfe
2023-12-06 13:08 ` Patrick Steinhardt
2023-12-06 13:47 ` René Scharfe
2023-12-06 17:21 ` Eric Sunshine
2023-12-06 17:29 ` René Scharfe
2023-12-06 11:51 ` [PATCH 4/7] revision, rev-parse: factorize incompatibility messages about --exclude-hidden René Scharfe
2023-12-06 13:08 ` Patrick Steinhardt
2023-12-06 14:21 ` René Scharfe
2023-12-06 14:39 ` Patrick Steinhardt
2023-12-06 17:07 ` René Scharfe
2023-12-06 19:25 ` Taylor Blau
2023-12-07 7:10 ` Patrick Steinhardt
2023-12-06 11:51 ` [PATCH 5/7] clean: factorize incompatibility message René Scharfe
2023-12-06 11:52 ` [PATCH 6/7] worktree: standardize incompatibility messages René Scharfe
2023-12-06 11:52 ` René Scharfe [this message]
2023-12-06 13:07 ` [PATCH 0/7] " Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231206115215.94467-8-l.s.r@web.de \
--to=l.s.r@web.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).