Re: [PATCH] revisions: add @{default} shorthand for default branch
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 2, 2026, 12:32 UTC
- Message-ID
- <xmqqjywv2une.fsf@gitster.g>
- In-Reply-To
- <20260131205521.11876-1-haraldnordgren@gmail.com>
Harald Nordgren <haraldnordgren@gmail.com> writes:
Show 10 quoted lines
>> 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?