git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Ian Whitlock <ian@theknown.net>, Git List <git@vger.kernel.org>
Subject: Re: Bug: "git-remote ls -h"
Date: Thu, 30 Jun 2022 11:34:51 -0700	[thread overview]
Message-ID: <xmqqpmiqdmpg.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cSnhbruJE_WBpmmypE_vzEQForooOu8KqbJ=dbaUrKKcg@mail.gmail.com> (Eric Sunshine's message of "Wed, 29 Jun 2022 12:29:53 -0400")

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.




      reply	other threads:[~2022-06-30 18:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqpmiqdmpg.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ian@theknown.net \
    --cc=sunshine@sunshineco.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.
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).