Re: Another use of "@"?
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- May 3, 2013, 22:09 UTC
- Message-ID
- <vpqy5bvaf6x.fsf@grenoble-inp.fr>
- In-Reply-To
- <7vr4hozie1.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 17 quoted lines
> Duy Nguyen <pclouds@gmail.com> writes: > >> My setup is a bit peculiar where I do git development on three >> different machines. Say I updated branch long-branch-name on machine >> A. Then I continue my work on machine B. I would want to hard reset >> that long-branch-name on machine B before resuming my work. What I >> usually do is >> >> git co long-branch-name >> git diff A/long-branch-name >> git reset --hard A/long-branch-name > > Perhaps > > git checkout long-bra<TAB> > git diff A/!$ > git reset --hard !$
I think Duy meant
git diff A/$(git symbolic-ref --short HEAD)
i.e. "the branch with the same name as the current one, but on a different remote". If this is the question, then it is a Git thing more than a shell one.
The A/@ could make sense, but I'm wondering whether we're taking the direction of implementing some kind of Brainfuck dialect in Git revision specifiers. I'm not sure we want to add more special characters here and there with subtly different meanings (@ = HEAD, @{1} = HEAD@{1}, A/@ = A/$(git symbolic-ref --short HEAD)).
-- Matthieu Moy http://www-verimag.imag.fr/~moy/