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

Re: Why git branch --show-current ignores -v?

From
Sergey Organov <sorganov@gmail.com>
Date
Dec 26, 2025, 15:43 UTC
Message-ID
<871pkh8d0l.fsf@osv.gnss.ru>
In-Reply-To
<xmqq8qeqm1tp.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 6 quoted lines
> Sergey Organov <sorganov@gmail.com> writes:
>
>> It looks useful and natural for "git branch --show-current -v[v]" to
>> verbosely describe current branch, similar to what --list does. Is there
>> sound reason why -v is not supported by --show-current?
>
[...]
Show 7 quoted lines
> I do not think anybody terribly objects if somebody teaches "-v" to
> make "git branch --show-current" more verbose, and other "--list"
> operations in general, but I suspect that the exact contents in the
> verbose output may have to be different from that of "--list".  For
> one thing, as "--show-current" limits its output to the current
> branch, the two-place indent "git branch --list" gives its output is
> not there, and "-v" would probably not want to add it.

Yep, I didn't mean to suggest exactly the same format and contents, though just reproducing the --list won't hurt either.

The actual use-case was to quickly figure the upstream branch and relative status of the current one, and

    git br --show-current -vv
just looked more natural for the job at hand than something like
    git br -lvv master

that besides is not exactly the same, and then the following one is kinda overkill for manual use)))

    git br -lvv `git br --show-current`

That suddenly gets me to why Git has no synonym for the current branch in the first place? No @HEAD or @@?

   git br -lvv @@
is pretty-looking perl'y that unfortunately doesn't work.

Thanks, Sergey Organov

Previous: Junio C Hamano
Message 6 of 6 in “Why git branch --show-current ignores -v?”
  1. Sergey OrganovDec 25, 2025
  2. Junio C HamanoDec 26, 2025
  3. Junio C HamanoDec 26, 2025
  4. branch: Remove unnecessary verbose flagK Jayatheerth, Dec 26, 2025
  5. Junio C HamanoDec 26, 2025
  6. Sergey OrganovDec 26, 2025

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.