Ramkumar Ramachandra <artagnon@xxxxxxxxx> writes: > The rev spec forms @{}, .., ... fill in HEAD as the missing argument > automatically. Unfortunately, HEAD~<n> is a very common idiom and > there is no way to make HEAD implicit here (due the shell expansion of > ~<n>). > > However, there is an alternative solution to the issue: overload the > character @ to mean HEAD. Do this at the lowest possible layer of > abstraction: in dwim_ref(), substitute @ with HEAD just before calling > resolve_ref_unsafe(). The program will only reach this point after > the other specs like ~, ^ and @{} have been resolved; therefore, it is > safe to do it here. > > This patch has the exact same effect as: > > $ git symbolic-ref @ HEAD But then why don't you just 'git symbolic-ref H HEAD' for a sort of "local alias"? What annoys me more is that there's no way to say git symbolic-ref U @{u} so that I can avoid that -- it's really clumsy to type on a Swiss German keyboard. We'd need some sort of ref-alias feature for that to work. -- Thomas Rast trast@{inf,student}.ethz.ch -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html