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

Re: [PATCH] branch doc: Change `git branch <pattern>` to use `<branchname>`

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Mar 24, 2017, 00:48 UTC
Message-ID
<20170324004858.GE20794@aiede.mtv.corp.google.com>
In-Reply-To
<xmqq37e3brxz.fsf@gitster.mtv.corp.google.com>
Junio C Hamano wrote:
Show 11 quoted lines
> I can go without "Do not forget ..." and everything that follows,
> though, and if we are going to do so, then
>
> 	--list::
> 		List branches.  With optional <pattern>...,
> 		e.g. `git branch --list 'maint-*`, list only the
> 		branches that match the pattern(s).
>
> would be fine.  I am not opposed to having an visually distinctive
> example--I just do not want to have one that is wrong without
> clearly marking it as such.

I like this one. I haven't witnessed "git branch maint-*" being a common mistake.

For comparison, "git branch -l maint-*" does seem to be a common mistake. It's a shame that the short-and-sweet "-l" was taken for that purpose. Perhaps it's worth calling that out here?

	--list::
	--list <pattern>::
		List branches.  If <pattern> is specified (e.g.,
		"git branch --list 'maint-*'), list only the
		branches that match the pattern.
	+
	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.

Thanks, Jonathan

Previous: Junio C HamanoNext: Junio C Hamano
Message 7 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.