Re: [PATCH] Add new @ shortcut for HEAD
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Apr 30, 2013, 19:53 UTC
- Message-ID
- <CALkWK0kUOEygRE8uMJbW=fOV6iGPAap+mbS7mysTHT3Ri+9eGg@mail.gmail.com>
- In-Reply-To
- <7vhaindcuk.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> [...] > You can't go any simpler than that rule, and there is no room for > confusion if that rule is properly implemented.
In other words: the sequence "@" is short for "HEAD". Isn't that _exactly_ what I implemented in my two-liner?
However, I'm tilting towards respecting .git/@ as a manual override. Why? Because we'd have to either claim that git symbolic-ref @ HEAD is a noop, or deny it altogether (by saying that @ is not a valid symbolic ref). The latter approach obviously sounds more sensible, but I don't like unnecessarily eating up @.