git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mattias Hansson <mattias.hansson@axis.com>
To: <git@vger.kernel.org>
Cc: Mattias Hansson <hansson.mattias@gmail.com>
Subject: [PATCH] ls-remote: Remove conflicting option "-h"
Date: Wed, 30 Oct 2019 18:33:37 +0100	[thread overview]
Message-ID: <20191030173337.6574-1-mattias.hansson@axis.com> (raw)

From: Mattias Hansson <hansson.mattias@gmail.com>

The "-h" option is documented to limit the result to heads, which is a
bit nonintuitive since "-h" is commonly used as the short option for
"--help". However, "-h" currently displays the usage information
which proves that there's a double reference to the option.

This patch will remove "-h" as a short option for "--heads". This
will maintain the current behaviour and correct the misleading
documentation.

Signed-off-by: Mattias Hansson <hansson.mattias@gmail.com>
---
 builtin/ls-remote.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index 6ef519514b..85ce336fc3 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -63,7 +63,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
 			   N_("path of git-upload-pack on the remote host"),
 			   PARSE_OPT_HIDDEN },
 		OPT_BIT('t', "tags", &flags, N_("limit to tags"), REF_TAGS),
-		OPT_BIT('h', "heads", &flags, N_("limit to heads"), REF_HEADS),
+		OPT_BIT(0, "heads", &flags, N_("limit to heads"), REF_HEADS),
 		OPT_BIT(0, "refs", &flags, N_("do not show peeled tags"), REF_NORMAL),
 		OPT_BOOL(0, "get-url", &get_url,
 			 N_("take url.<base>.insteadOf into account")),
-- 
2.22.0


             reply	other threads:[~2019-10-30 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 17:33 Mattias Hansson [this message]
2019-10-30 18:28 ` [PATCH] ls-remote: Remove conflicting option "-h" SZEDER Gábor

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=20191030173337.6574-1-mattias.hansson@axis.com \
    --to=mattias.hansson@axis.com \
    --cc=git@vger.kernel.org \
    --cc=hansson.mattias@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).