Re: [PATCH] refs.c: interpret @ as HEAD
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- May 1, 2013, 02:18 UTC
- Message-ID
- <CACsJy8CZ8E-ASmo237rRbYR7pqoseo-NpU6jVrg6Rvd9qSY01w@mail.gmail.com>
- In-Reply-To
- <CALkWK0nnmzV0dcZ9avO9zDPhnQh9wkF7stA77cNycoXfecfUuw@mail.gmail.com>
On Wed, May 1, 2013 at 12:15 AM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 11 quoted lines
> Duy Nguyen wrote: >> We could put still ref aliases >> into the same ref namespace, with lower precedence that actual refs, >> so no new syntax required. > > Actually, ref-alises are the right way to solve the problem. > Recursive symref peeling is a bad idea: I can't take my aliases with > me, and they complicate unnecessarily. > > Any thoughts on how to implement it? Should it go as deep as > resolve_ref_unsafe()?
Depends on how you define ref alias. resolve_ref_unsafe allows you to substitute one ref with another. Thomas was talking about substituting part of extended sha-1 syntax (U -> @{u}) so it can't be done down there. I still think get_sha1_with_context_1() is the right place. Still not so sure how to handle when we have both alias "U" and refs/heads/U. -- Duy