Thread (82 messages) flat view 82 messages, 7 authors, 2022-01-05
STALE1721d

Revision v2 of 5 in this series.

Revisions (5)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]

[PATCH v2 05/11] i18n: tag.c factorize i18n strings

From: Jean-Noël Avila via GitGitGadget <hidden>
Date: 2021-12-27 23:24:14
Subsystem: the rest · Maintainer: Linus Torvalds

From: =?UTF-8?q?Jean-No=C3=ABl=20Avila?= <redacted>

Signed-off-by: Jean-Noël Avila <redacted>
---
 builtin/tag.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/builtin/tag.c b/builtin/tag.c
index 6f7cd0e3ef5..a2ab2b15304 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -483,6 +483,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
 		OPT_END()
 	};
 	int ret = 0;
+	const char *only_in_list = NULL;
 
 	setup_ref_filter_porcelain_msg();
 
@@ -542,13 +543,15 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
 		goto cleanup;
 	}
 	if (filter.lines != -1)
-		die(_("-n option is only allowed in list mode"));
+		only_in_list = "-n";
 	if (filter.with_commit)
-		die(_("--contains option is only allowed in list mode"));
+		only_in_list = "--contains";
 	if (filter.no_commit)
-		die(_("--no-contains option is only allowed in list mode"));
+		only_in_list = "--no-contains";
 	if (filter.points_at.nr)
-		die(_("--points-at option is only allowed in list mode"));
+		only_in_list = "--points-at";
+	if (only_in_list)
+		die("the '%s' option is only allowed in list mode", only_in_list);
 	if (filter.reachable_from || filter.unreachable_from)
 		die(_("--merged and --no-merged options are only allowed in list mode"));
 	if (cmdmode == 'd') {
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help