mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
i18n: tag.c factorize i18n strings
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Reviewed-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
c4904377ba
commit
408c5c5c79
|
@ -483,6 +483,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
|
||||||
OPT_END()
|
OPT_END()
|
||||||
};
|
};
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
const char *only_in_list = NULL;
|
||||||
|
|
||||||
setup_ref_filter_porcelain_msg();
|
setup_ref_filter_porcelain_msg();
|
||||||
|
|
||||||
|
@ -542,15 +543,19 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (filter.lines != -1)
|
if (filter.lines != -1)
|
||||||
die(_("-n option is only allowed in list mode"));
|
only_in_list = "-n";
|
||||||
if (filter.with_commit)
|
else if (filter.with_commit)
|
||||||
die(_("--contains option is only allowed in list mode"));
|
only_in_list = "--contains";
|
||||||
if (filter.no_commit)
|
else if (filter.no_commit)
|
||||||
die(_("--no-contains option is only allowed in list mode"));
|
only_in_list = "--no-contains";
|
||||||
if (filter.points_at.nr)
|
else if (filter.points_at.nr)
|
||||||
die(_("--points-at option is only allowed in list mode"));
|
only_in_list = "--points-at";
|
||||||
if (filter.reachable_from || filter.unreachable_from)
|
else if (filter.reachable_from)
|
||||||
die(_("--merged and --no-merged options are only allowed in list mode"));
|
only_in_list = "--merged";
|
||||||
|
else if (filter.unreachable_from)
|
||||||
|
only_in_list = "--no-merged";
|
||||||
|
if (only_in_list)
|
||||||
|
die(_("the '%s' option is only allowed in list mode"), only_in_list);
|
||||||
if (cmdmode == 'd') {
|
if (cmdmode == 'd') {
|
||||||
ret = delete_tags(argv);
|
ret = delete_tags(argv);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
Loading…
Reference in a new issue