Re: [Bug] Porcelain allows creation of '@' branch
- From
D. Ben Knoble <ben.knoble@gmail.com>
- Date
- Oct 16, 2026, 18:09 UTC
- Message-ID
- <CALnO6CA7vxpmhVB3pi3gpVcbtCS_yHtA+a1Ud25P00JDAqboAA@mail.gmail.com>
- In-Reply-To
- <xmqq4ielirpr.fsf@gitster.g>
On Fri, Oct 16, 2026 at 11:35 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 27 quoted lines
>
> Bence Csókás <bence.csokas@arm.com> writes:
>
> > On 2026. 09. 03. 14:35, Bence Csókás wrote:
> >> On 2026. 09. 03. 10:38, Kristoffer Haugsbakk wrote:
> >>> Not a bug (2024) https://lore.kernel.org/git/xmqqy12z7eti.fsf@gitster.g/
> >>>
> >>> I suspect that it is much more productive to deprecate and remove
> >>> "@" that is a built-in synomym for HEAD (but "refs/remotes/origin/@"
> >>> does not act as a synonym for "refs/remotes/origin/HEAD"). [...]
> >> I would not want to see @ removed, I have abandoned using HEAD years
> >> ago, too much typing (especially if you want to express more complex
> >> things, e.g. `git range-diff long-branch-name{^..otherbranch,..@}`, to
> >> pick an example out of my bash-history).
> >>
> >> Bence
> >
> > P.S.:
> >
> > $ history | grep 'git .*@' | wc -l
> > 74
> > $ history | grep HEAD | wc -l
> > 0
> >
> > ;)
>
> You have some unlearning of a bad habit to do, then ;-)Phaw! What's good (short and easy to type) for interactive use may not be great for scripts, sure, (in which case spelling out long options, writing HEAD, etc., is advisable).
But shorthands are convenient day-to-day. What's a bad habit about that?
(Besides, the OP's grep also counts uses of @{upstream}/@{u}/@{push}/reflog syntax/etc.)
-- D. Ben Knoble