summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-01-10 19:52:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-01-10 19:52:56 (GMT)
commitc17de5a505a2da23fcbfefdc8b0aad3f045a510f (patch)
treeffe4bd8ace908793b99ee45fb8e1b17be5fb7e2d /revision.c
parent2c5410480ea7ea92e39667fedc8eba1f7a95bc9e (diff)
parent246cac85055f513626159e8cd20b741eaf5f9f97 (diff)
downloadgit-c17de5a505a2da23fcbfefdc8b0aad3f045a510f.zip
git-c17de5a505a2da23fcbfefdc8b0aad3f045a510f.tar.gz
git-c17de5a505a2da23fcbfefdc8b0aad3f045a510f.tar.bz2
Merge branch 'ja/i18n-similar-messages'
Similar message templates have been consolidated so that translators need to work on fewer number of messages. * ja/i18n-similar-messages: i18n: turn even more messages into "cannot be used together" ones i18n: ref-filter: factorize "%(foo) atom used without %(bar) atom" i18n: factorize "--foo outside a repository" i18n: refactor "unrecognized %(foo) argument" strings i18n: factorize "no directory given for --foo" i18n: factorize "--foo requires --bar" and the like i18n: tag.c factorize i18n strings i18n: standardize "cannot open" and "cannot read" i18n: turn "options are incompatible" into "cannot be used together" i18n: refactor "%s, %s and %s are mutually exclusive" i18n: refactor "foo and bar are mutually exclusive"
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/revision.c b/revision.c
index 250f61e..ad4286f 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(_("the option '%s' requires '%s'"), "--grep-reflog", "--walk-reflogs");
if (revs->line_level_traverse &&
(revs->diffopt.output_format & ~(DIFF_FORMAT_PATCH | DIFF_FORMAT_NO_OUTPUT)))