{"thread":{"id":"58082","subject":"Bug: \"git-remote ls -h\"","startedAt":"2022-06-29T15:27:32Z","lastAt":"2022-06-30T18:34:59Z","messageCount":3,"participants":["Ian Whitlock","Eric Sunshine","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"458103","messageId":"d2a7caa9-e2ba-457d-9fe9-92b29b5ee47a@www.fastmail.com","threadId":"58082","inReplyTo":null,"subject":"Bug: \"git-remote ls -h\"","fromName":"Ian Whitlock","fromEmail":"ian@theknown.net","sentAt":"2022-06-29T15:26:59Z","receivedAt":"2022-06-29T15:27:32Z","isPatch":false,"sender":{"key":"ian@theknown.net","avatar":null},"body":"Hi,\n\nI found a bug and couldn't find another way to report it. I hope this is okay.\nThe help output for `git ls-remote` shows that `-h` should display remote HEADs, but instead the help output is displayed!\n\n ➜ git ls-remote -h     \nusage: git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n                     [-q | --quiet] [--exit-code] [--get-url]\n                     [--symref] [<repository> [<refs>...]]\n\n    -q, --quiet           do not print remote URL\n    --upload-pack <exec>  path of git-upload-pack on the remote host\n    -t, --tags            limit to tags\n    -h, --heads           limit to heads\n    --refs                do not show peeled tags\n    --get-url             take url.<base>.insteadOf into account\n    --sort <key>          field name to sort on\n    --exit-code           exit with exit code 2 if no matching refs are found\n    --symref              show underlying ref in addition to the object pointed by it\n    -o, --server-option <server-specific>\n                          option to transmit\n\n\nSmall bug, but a bug nonetheless.\n\nThanks for building such a lovely tool\n"},{"id":"458104","messageId":"CAPig+cSnhbruJE_WBpmmypE_vzEQForooOu8KqbJ=dbaUrKKcg@mail.gmail.com","threadId":"58082","inReplyTo":"d2a7caa9-e2ba-457d-9fe9-92b29b5ee47a@www.fastmail.com","subject":"Re: Bug: \"git-remote ls -h\"","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2022-06-29T16:29:53Z","receivedAt":"2022-06-29T16:30:08Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Wed, Jun 29, 2022 at 11:39 AM Ian Whitlock <ian@theknown.net> wrote:\n> I found a bug and couldn't find another way to report it. I hope this is okay.\n> The help output for `git ls-remote` shows that `-h` should display remote HEADs, but instead the help output is displayed!\n\nThanks for the report.\n\n>  ➜ git ls-remote -h\n> usage: git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n>                      [-q | --quiet] [--exit-code] [--get-url]\n>                      [--symref] [<repository> [<refs>...]]\n\nThis is a known and documented behavior. The description of the `-h`\noption in the `ls-remote` help page:\n\n    Limit to only refs/heads and refs/tags, respectively. These\n    options are not mutually exclusive; when given both, references\n    stored in refs/heads and refs/tags are displayed. Note that git\n    ls-remote -h used without anything else on the command line gives\n    help, consistent with other git subcommands.\n"},{"id":"458240","messageId":"xmqqpmiqdmpg.fsf@gitster.g","threadId":"58082","inReplyTo":"CAPig+cSnhbruJE_WBpmmypE_vzEQForooOu8KqbJ=dbaUrKKcg@mail.gmail.com","subject":"Re: Bug: \"git-remote ls -h\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-06-30T18:34:51Z","receivedAt":"2022-06-30T18:34:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Wed, Jun 29, 2022 at 11:39 AM Ian Whitlock <ian@theknown.net> wrote:\n>> I found a bug and couldn't find another way to report it. I hope this is okay.\n>> The help output for `git ls-remote` shows that `-h` should display remote HEADs, but instead the help output is displayed!\n>\n> Thanks for the report.\n>\n>>  ➜ git ls-remote -h\n>> usage: git ls-remote [--heads] [--tags] [--refs] [--upload-pack=<exec>]\n>>                      [-q | --quiet] [--exit-code] [--get-url]\n>>                      [--symref] [<repository> [<refs>...]]\n>\n> This is a known and documented behavior. The description of the `-h`\n> option in the `ls-remote` help page:\n>\n>     Limit to only refs/heads and refs/tags, respectively. These\n>     options are not mutually exclusive; when given both, references\n>     stored in refs/heads and refs/tags are displayed. Note that git\n>     ls-remote -h used without anything else on the command line gives\n>     help, consistent with other git subcommands.\n\nCorrect.\n\nI do not mind a patch that teaches ls-remote to emit an extra line\nof hint after giving the standard short-help-usage text, telling the\nuser that \"git ls-remote -h origin\" (replace 'origin' with whatever\nthe default remote is) can be used to learn the branches at the\nremote.\n\nThanks.\n\n\n\n"}]}