Skip to content

Commit 792b862

Browse files
rscharfegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 62bc6dd commit 792b862

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/worktree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,8 @@ static int add(int ac, const char **av, const char *prefix)
815815
die(_("options '%s' and '%s' cannot be used together"),
816816
"--orphan", "--no-checkout");
817817
if (opts.orphan && ac == 2)
818-
die(_("'%s' and '%s' cannot be used together"), "--orphan",
819-
_("<commit-ish>"));
818+
die(_("option '%s' and commit-ish cannot be used together"),
819+
"--orphan");
820820
if (lock_reason && !keep_locked)
821821
die(_("the option '%s' requires '%s'"), "--reason", "--lock");
822822
if (lock_reason)

0 commit comments

Comments
 (0)