Re: [1.8.0] Remote tag namespace
From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:50:29
On Tue, Feb 1, 2011 at 10:07 PM, Marc Branchaud [off-list ref] wrote:
quoted
Config branch.*.globalTags (perhaps takes a pattern?) may be defined to create refs/tags/* in addition to refs/remote-tags/<remote>/* when fetching tags.I may be getting into the weeds prematurely here, but why put the config item under branch.* ? Or did you mean remote.*.globalTags? Personally, I don't see a need for this. I'd rather have the rev-parse machinery search in remote tag namespaces if it can't find anything local.
Ahh.. yeah it's remote.*.globalTags. I don't know, some people might find current behavior useful. So instead of dropping it entirely, I'd limit it to certain remotes.
quoted
Migration plan: refs/remote-tags will be used to store new tags unconditionally, which means there will be duplicates with the already-fetched tags in global namespace. Perhaps we can check if they point to the same sha-1, then choose not to annoy users with ambiguous tag messages?(Again with the weeds...) I don't think we could do that. I'd want to be able to have my own (local) tags that refer to the same commits as one or more remote tags, and I'd want to see them all.
For listing tags (I forgot this) I think we just follow how git-branch does it: show only local tags unless -r (or some other option) is given. What I meant in the above paragraph is "some-ref" can refer to refs/tags/some-ref or refs/remotes/foo/tags/some-ref, but I was wrong on this. The latter can only be referred by foo/some-ref or with migration support in your proposal.
Better for "git tag" to learn scoping options like "git branch": -a and -r. (Hmm, maybe git-tag's current -a could become -A...)
When tags are put in remote namespace (wherever it actually is), git-tag must learn -r like git-branch. I think option name change for -a is too late though. When "git-ng" rewrite project comes (that is after libgit2 replaces git core), we may have everything consistent again. PS. I bet git-ng would start after Wine 2.0 is released. -- Duy