aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2023-12-06 12:52:01 +0100
committerJunio C Hamano <gitster@pobox.com>2023-12-09 07:41:03 +0900
commit792b86283b13fb2e06b9e62c64fca51b879d0266 (patch)
tree017a2a0b5b6caee7678cb68a7d44b133ecfbb6aa
parent62bc6dd33c9cfc3fe155f46dc91d1c9056464dde (diff)
downloadgit-792b86283b13fb2e06b9e62c64fca51b879d0266.tar.gz
worktree: simplify incompatibility message for --orphan and commit-ish
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/worktree.c4
1 files 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)