Subject: Re: [PATCH] revisions: add @{default} shorthand for default branch

From: Junio C Hamano <[email-masked]>
Date: Mon, 02 Feb 2026 13:33:27 -0800

"D. Ben Knoble" <[email-masked]> writes:

> If you don't need to be on a branch, then "git switch -d origin" (or
> upstream, or whatever your remote is) should work just fine.
>
> That just makes discovering the name of the remote the "interesting" part…

The only thing that is different is if you need to _name_ a branch,
or the commit pointed at is sufficient.  In order to run something
like "git shortlog origin..", "git shortlog @{default}.." is not
needed.

Of course, checking out and to be on the branch requires you to name
a branch (otherwise when two branches point at the same commit, you
cannot tell which one you want to check out).