Re: [1.8.0] Remote tag namespace
- From
Jeff King <peff@peff.net>
- Date
- Feb 1, 2011, 18:14 UTC
- Message-ID
- <20110201181428.GA6579@sigill.intra.peff.net>
- In-Reply-To
- <AANLkTi=yFwOAQMHhvLsB1_xmYOE9HHP2YB4H4TQzwwc8@mail.gmail.com>
On Tue, Feb 01, 2011 at 05:44:50PM +0700, Nguyen Thai Ngoc Duy wrote:
Show 9 quoted lines
> OK I'm not familiar with tag code, but I can try. > > Proposal: > > Reserve refs/remote-tags namespace to store tags from remotes. Its > structure is the same as in refs/remotes. When pulling tags, put them > in refs/remote-tags/<remote> instead of refs/tags. > Tag dereference code will be taught about refs/remote-tags with > similar deref order as in remote branches.
There are similar questions around remote notes refs. Should there also be a refs/remote-notes? And there was some discussion recently about fetching remote replace refs.
Should we perhaps be massaging refs/remotes into a structure to handle all of these things? Like:
refs/remotes/origin/HEAD (-> refs/remotes/origin/heads/master) refs/remotes/origin/heads/master refs/remotes/origin/tags/v1.7.4 refs/remotes/origin/notes/commit refs/remotes/origin/replace/f67e92af477a2255b64a1ece33d9d126e763fe9b
i.e., make refs/remotes/* an actual mirror of selected parts of the remote's refs/ hierarchy. And then figure out sane rules for merging those namespaces into the ref lookup procedure. For heads and tags, probably some tweaking of the lookup rules in dwim_ref; for replacements, probably you would want to manually say "I am interested in this replace" and copy or symref-link it into your refs/ hierarchy. And probably something similar with notes.
Obviously I haven't thought it all the way through, but it just seems a shame not to deal with other similar issues when looking at tags.
-Peff