git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] branch doc: update description for `--list`

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 24, 2017, 11:06 UTC
Message-ID
<CACBZZX5xKaOBY8nWAbnLGyRiHW0MnFsEeF5ehpVCviyWc1mb3w@mail.gmail.com>
In-Reply-To
<xmqqtw6j8e7f.fsf_-_@gitster.mtv.corp.google.com>
On Fri, Mar 24, 2017 at 5:56 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 31 quoted lines
> The paragraph begins with a sample command line `git branch <name>`
> that has nothing to do with the option being described.  Remove it,
> but use the space to instead show that multiple patterns can be
> given.
>
> Also mention the unfortunate `-l` that can be easily confused with
> it.
>
> Helped-by: Jonathan Nieder <jrnieder@gmail.com>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  Documentation/git-branch.txt | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
> index 6a17ca591a..514b0d0b91 100644
> --- a/Documentation/git-branch.txt
> +++ b/Documentation/git-branch.txt
> @@ -142,8 +142,13 @@ This option is only applicable in non-verbose mode.
>         List both remote-tracking branches and local branches.
>
>  --list::
> -       Activate the list mode. `git branch <branchname>` would try to create a branch,
> -       use `git branch --list <pattern>` to list matching branches.
> +       List branches.  With optional `<pattern>...`, e.g. `git
> +       branch --list 'maint-*'`, list only the branches that match
> +       the pattern(s).
> ++
> +This should not be confused with `git branch -l <branchname>`,
> +which creates a branch named `<branchname>` with a reflog.
> +See `--create-reflog` above for details.
Looks good to me.
Show 5 quoted lines
>  -v::
>  -vv::
> --
> 2.12.1-432-gf364f02724
>
Previous: Jonathan Nieder
Message 10 of 10 in “branch doc: Change `git branch <pattern>` to use `<branchname>`”
  1. branch doc: Change `git branch <pattern>` to use `<branchname>`Ævar Arnfjörð Bjarmason, Mar 23, 2017
  2. Junio C HamanoMar 23, 2017
  3. Ramsay JonesMar 23, 2017
  4. Junio C HamanoMar 23, 2017
  5. Ævar Arnfjörð BjarmasonMar 23, 2017
  6. Junio C HamanoMar 23, 2017
  7. Jonathan NiederMar 24, 2017
  8. branch doc: update description for `--list`Junio C Hamano, Mar 24, 2017
  9. Jonathan NiederMar 24, 2017
  10. Ævar Arnfjörð BjarmasonMar 24, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.