git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Organov <sorganov@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Why git branch --show-current ignores -v?
Date: Fri, 26 Dec 2025 18:43:22 +0300	[thread overview]
Message-ID: <871pkh8d0l.fsf@osv.gnss.ru> (raw)
In-Reply-To: <xmqq8qeqm1tp.fsf@gitster.g> (Junio C. Hamano's message of "Fri, 26 Dec 2025 11:09:06 +0900")

Junio C Hamano <gitster@pobox.com> writes:

> 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?
>

[...]

> 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

      parent reply	other threads:[~2025-12-26 15:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-25 16:08 Why git branch --show-current ignores -v? Sergey Organov
2025-12-26  2:09 ` Junio C Hamano
2025-12-26  2:11   ` Junio C Hamano
2025-12-26  3:28     ` [PATCH] branch: Remove unnecessary verbose flag K Jayatheerth
2025-12-26  4:15       ` Junio C Hamano
2025-12-26 15:43   ` Sergey Organov [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

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

  git send-email \
    --in-reply-to=871pkh8d0l.fsf@osv.gnss.ru \
    --to=sorganov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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 NNTP newsgroup(s).