Re: [PATCH] Add new @ shortcut for HEAD

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Add new @ shortcut for HEAD

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:05

Ramkumar Ramachandra [off-list ref] writes:
Junio C Hamano wrote:
quoted
If you accept only "@" but not "master@", that behaviour needs a
wrong world model to understand and justify (one of which is "@ is a
synonym for HEAD").  If your rule is "In $anything@{$n}, you can
drop {$n} when $n==0", then HEAD@{0} becomes HEAD@ and master@{0}
becomes master@, and @{0} becomes @ naturally.
Besides, you're going in the wrong direction this time.  You are
trying to fit an explanation to something that is useless.  How is
master@ useful?
How else would you explain why "rev-parse --symbolic-full-name @"
does not make sense and "update-ref @" does not update HEAD?

Re: [PATCH] Add new @ shortcut for HEAD

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:57:05

Junio C Hamano wrote:
How else would you explain why "rev-parse --symbolic-full-name @"
does not make sense
It does make sense.  (Try it with my patch) [*1*]
and "update-ref @" does not update HEAD?
Why should update-ref update HEAD?  I'm asking it to update the
symbolic-ref override .git/@.

[Footnote]

*1* I made a mistake in the commit message when I said that git
symbolic-ref @ HEAD had the exact same effect.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help