Stop advertising -h as the short equivalent of --heads, because it's
used for showing a short help text for almost all other git commands.
Since the ba5f28bf79 (ls-remote: use parse-options api) it has only
been working when used together with other parameters anyway.

Signed-off-by: Rene Scharfe <l....@web.de>
---
That would be step on the way towards more consistent command line
switches, in the same vein as d69155119 (t0012: test "-h" with
builtins).

 Documentation/git-ls-remote.txt | 1 -
 builtin/ls-remote.c             | 4 +++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
index 5f2628c8f8..898836a111 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 c4be98ab9e..840deedbef 100644
--- a/builtin/ls-remote.c
+++ b/builtin/ls-remote.c
@@ -56,7 +56,9 @@ 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),
+               { OPTION_BIT, 'h', NULL, &flags, NULL, N_("limit to heads"),
+                       PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 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.14.2

Reply via email to