From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH] remote: simplify "remote add --tags" help text
Date: Tue, 18 Jul 2023 15:31:03 -0700 [thread overview]
Message-ID: <xmqqzg3setso.fsf@gitster.g> (raw)
In-Reply-To: <xmqq5y6gg8fn.fsf@gitster.g> (Junio C. Hamano's message of "Tue, 18 Jul 2023 15:29:32 -0700")
The help text for the --tags option was split into two option[]
entries, which was a hacky way to give two lines of help text (the
second entry did not have either short or long help, and there was
no way to invoke its entry---it was there only for the help text).
As we now support multi-line text in the option help, let's make
the second line of the help a proper second line and remove the
hacky second entry.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
builtin/remote.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/builtin/remote.c b/builtin/remote.c
index 1e0b137d97..09fb9ae30d 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -167,10 +167,9 @@ static int add(int argc, const char **argv, const char *prefix)
struct option options[] = {
OPT_BOOL('f', "fetch", &fetch, N_("fetch the remote branches")),
OPT_SET_INT(0, "tags", &fetch_tags,
- N_("import all tags and associated objects when fetching"),
+ N_("import all tags and associated objects when fetching\n"
+ "or do not fetch any tag at all (--no-tags)"),
TAGS_SET),
- OPT_SET_INT(0, NULL, &fetch_tags,
- N_("or do not fetch any tag at all (--no-tags)"), TAGS_UNSET),
OPT_STRING_LIST('t', "track", &track, N_("branch"),
N_("branch(es) to track")),
OPT_STRING('m', "master", &master, N_("branch"), N_("master branch")),
--
2.41.0-376-gcba07a324d
next prev parent reply other threads:[~2023-07-18 22:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 22:29 [PATCH] short help: allow multi-line opthelp Junio C Hamano
2023-07-18 22:31 ` Junio C Hamano [this message]
2023-07-18 22:54 ` [PATCH v2] " Junio C Hamano
2023-07-18 22:58 ` [RFC] short help: allow a gap smaller than USAGE_GAP Junio C Hamano
2023-07-19 22:04 ` Beat Bolli
2023-07-19 23:26 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqzg3setso.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.