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

Re: [PATCH] Introduce --current option to git-branch builtin command.

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 7, 2012, 17:11 UTC
Message-ID
<7v4nqnjbcc.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4FD069A5.1040905@lyx.org>
Vincent van Ravesteijn <vfr@lyx.org> writes:
> git-branch has four modes: 'list', 'create', 'delete', and
> rename'. Isn't --current then just another option to the 'list'-mode?

That is how I would look at it. We can think of various ways that "list" can be filtered, and matching by name is one that we have an implementation for. "Current-only" could be another one.

Show 5 quoted lines
> If '--current' implies the 'list'-mode, it would use
> print_ref_list'. There already is code in print_ref_list to detect
> whether a branch is the current one, it outputs the branch list in a
> formatted way, it takes care of 'columns', so wouldn't it be better to
> modify that code to only print the current branch ?
Exactly.
Previous: Vincent van RavesteijnNext: konglu@minatec.inpg.fr
Message 3 of 5 in “Introduce --current option to git-branch builtin command.”
  1. Introduce --current option to git-branch builtin command.Kenta Murata (村田 賢太), Jun 7, 2012
  2. Vincent van RavesteijnJun 7, 2012
  3. Junio C HamanoJun 7, 2012
  4. konglu@minatec.inpg.frJun 7, 2012
  5. Nguyen Thai Ngoc DuyJun 7, 2012

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.