Thread (2 messages) 2 messages, 2 authors, 2024-07-25

Re: [PATCH 1/1] show-ref: improve short help messages of options

From: Patrick Steinhardt <hidden>
Date: 2024-07-25 07:15:41

On Wed, Jul 24, 2024 at 02:11:11PM +0300, Alexander Shopov wrote:
quoted hunk ↗ jump to hunk
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 839a5c29f3..85700caae9 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -293,8 +293,8 @@ int cmd_show_ref(int argc, const char **argv, const char *prefix)
 	struct show_one_options show_one_opts = {0};
 	int verify = 0, exists = 0;
 	const struct option show_ref_options[] = {
-		OPT_BOOL(0, "tags", &patterns_opts.tags_only, N_("only show tags (can be combined with branches)")),
-		OPT_BOOL(0, "branches", &patterns_opts.branches_only, N_("only show branches (can be combined with tags)")),
+		OPT_BOOL(0, "tags", &patterns_opts.tags_only, N_("only show tags (can be combined with --branches)")),
+		OPT_BOOL(0, "branches", &patterns_opts.branches_only, N_("only show branches (can be combined with --tags)")),
 		OPT_HIDDEN_BOOL(0, "heads", &patterns_opts.branches_only,
 				N_("deprecated synonym for --branches")),
 		OPT_BOOL(0, "exists", &exists, N_("check for reference existence without resolving")),
Agreed, I think that this is a sensible change. In practice, this
feature can also be combined with `--head`, so in that spirit we might
even change it to:

    "only show tags (can be combined with --branches and --head)"

Not sure though whether this is getting too noisy?

Patrick

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help