git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug: "git-remote ls -h"
@ 2022-06-29 15:26 Ian Whitlock
  2022-06-29 16:29 ` Eric Sunshine
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Whitlock @ 2022-06-29 15:26 UTC (permalink / raw)
  To: git

Hi,

I found a bug and couldn't find another way to report it. I hope this is okay.
The help output for `git ls-remote` shows that `-h` should display remote HEADs, but instead the help output is displayed!

 ➜ git ls-remote -h     
usage: git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]
                     [-q | --quiet] [--exit-code] [--get-url]
                     [--symref] [<repository> [<refs>...]]

    -q, --quiet           do not print remote URL
    --upload-pack <exec>  path of git-upload-pack on the remote host
    -t, --tags            limit to tags
    -h, --heads           limit to heads
    --refs                do not show peeled tags
    --get-url             take url.<base>.insteadOf into account
    --sort <key>          field name to sort on
    --exit-code           exit with exit code 2 if no matching refs are found
    --symref              show underlying ref in addition to the object pointed by it
    -o, --server-option <server-specific>
                          option to transmit


Small bug, but a bug nonetheless.

Thanks for building such a lovely tool

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

* Re: Bug: "git-remote ls -h"
  2022-06-29 15:26 Bug: "git-remote ls -h" Ian Whitlock
@ 2022-06-29 16:29 ` Eric Sunshine
  2022-06-30 18:34   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Sunshine @ 2022-06-29 16:29 UTC (permalink / raw)
  To: Ian Whitlock; +Cc: Git List

On Wed, Jun 29, 2022 at 11:39 AM Ian Whitlock <ian@theknown.net> wrote:
> I found a bug and couldn't find another way to report it. I hope this is okay.
> The help output for `git ls-remote` shows that `-h` should display remote HEADs, but instead the help output is displayed!

Thanks for the report.

>  ➜ git ls-remote -h
> usage: git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]
>                      [-q | --quiet] [--exit-code] [--get-url]
>                      [--symref] [<repository> [<refs>...]]

This is a known and documented behavior. The description of the `-h`
option in the `ls-remote` help page:

    Limit to only refs/heads and refs/tags, respectively. These
    options are not mutually exclusive; when given both, references
    stored in refs/heads and refs/tags are displayed. Note that git
    ls-remote -h used without anything else on the command line gives
    help, consistent with other git subcommands.

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

* Re: Bug: "git-remote ls -h"
  2022-06-29 16:29 ` Eric Sunshine
@ 2022-06-30 18:34   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2022-06-30 18:34 UTC (permalink / raw)
  To: Eric Sunshine; +Cc: Ian Whitlock, Git List

Eric Sunshine <sunshine@sunshineco.com> writes:

> On Wed, Jun 29, 2022 at 11:39 AM Ian Whitlock <ian@theknown.net> wrote:
>> I found a bug and couldn't find another way to report it. I hope this is okay.
>> The help output for `git ls-remote` shows that `-h` should display remote HEADs, but instead the help output is displayed!
>
> Thanks for the report.
>
>>  ➜ git ls-remote -h
>> usage: git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]
>>                      [-q | --quiet] [--exit-code] [--get-url]
>>                      [--symref] [<repository> [<refs>...]]
>
> This is a known and documented behavior. The description of the `-h`
> option in the `ls-remote` help page:
>
>     Limit to only refs/heads and refs/tags, respectively. These
>     options are not mutually exclusive; when given both, references
>     stored in refs/heads and refs/tags are displayed. Note that git
>     ls-remote -h used without anything else on the command line gives
>     help, consistent with other git subcommands.

Correct.

I do not mind a patch that teaches ls-remote to emit an extra line
of hint after giving the standard short-help-usage text, telling the
user that "git ls-remote -h origin" (replace 'origin' with whatever
the default remote is) can be used to learn the branches at the
remote.

Thanks.




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

end of thread, other threads:[~2022-06-30 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 15:26 Bug: "git-remote ls -h" Ian Whitlock
2022-06-29 16:29 ` Eric Sunshine
2022-06-30 18:34   ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).