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

From: Junio C Hamano <[email-masked]>
Date: Mon, 02 Feb 2026 04:32:21 -0800

Harald Nordgren <[email-masked]> writes:

>> Doesn't repo_default_branch_name() do the right thing without being
>> noisy at all even in a repository without that configured, as the
>> function will fall back to the built-in default?  While I do not
>> think of a workflow in which a handy access to the value the
>> function gives would be so useful that it deserves a short-hand, it
>> would be a reasonable candidate of what to be called "@{default}",
>> if it proves useful, I would think.
>
> After looking a this, this is hard-coded. Not showing what is relevant for
> each repo that exists:

Yes.

Of course.  It was a suggestion to avoid getting failures in
repositories that do not override it with their own configuration
files.

So the @{default} we originally discussed was not something that is
"relevant for each repo", and where refs/remotes/origin/HEAD points
at has a better chance of closer to the relevant name?