git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] ls-remote: don't use '-h' for options
@ 2020-02-27 11:42 dev
  2020-02-27 13:08 ` Danh Doan
  0 siblings, 1 reply; 6+ messages in thread
From: dev @ 2020-02-27 11:42 UTC (permalink / raw)
  To: git

The '-h' option for ls-remote will never be reached as the argument is
already processed by the git wrapper before passed on to ls-remote.
The ls-remote help text will therefore be displayed instead of the
'--heads' option.

Signed-off-by: Pascal Roeleven <dev@pascalroeleven.nl>
---
  Documentation/git-ls-remote.txt | 1 -
  builtin/ls-remote.c             | 2 +-
  2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/Documentation/git-ls-remote.txt 
b/Documentation/git-ls-remote.txt
index a2ea1fd..b5b7d7a 100644
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -21,7 +21,6 @@ commit IDs.

  OPTIONS
  -------
--h::
  --heads::
  -t::
  --tags::
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index 6ef5195..85ce336 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.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-27 17:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-27 11:42 [PATCH 1/1] ls-remote: don't use '-h' for options dev
2020-02-27 13:08 ` Danh Doan
2020-02-27 14:10   ` Pascal Roeleven
2020-02-27 16:10     ` Junio C Hamano
2020-02-27 17:39       ` Pascal Roeleven
2020-02-27 17:54         ` Junio C Hamano

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).