Re: newbie questions about git design and features (some wrt hg)
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:42:52
Mark Wooding wrote:
Jakub Narebski [off-list ref] wrote:quoted
BTW does Mercurial have tags?Yes. Mercurial stores tags in text files, one per line, mapping the tag name to a SHA1 hash of the tagged revision. There are two files of tags: `local' tags go into .hg/tags (or somesuch) and don't get copied by clone; global tags go into .hgtags and do get copied (of course, since they're part of the source tree).
Gaaah. Why anyone would want to have non-propagated tags? Do I understand correctly that Mercurial doesn't have annotated tags (this also means that it doesn't have PGP/GPG signed tags), and only equivalent of git lightweight tags?
If I may be opinionated for a bit: this is barking for two reasons:
* The tags files grow by having lines added to the bottom. Files of
this kind are almost ideal for causing merge conflicts, and there's
no automatic means for resolving them. (I actually wrote a custom
tags merger recently -- if anyone wants it, just mail me.)Such a merger (merge strategy) would be also useful for other log-like files, e.g. ChangeLogs and such.
* If I visit a tag, and then decide I want to visit some other, more
recent tag, I'm screwed because it obviously didn't exist in that
old revision. Tying tags to the revision history in this way is
truly daft.In git tags are direct or indirect (via tag object, creating annotated tag) pointers to points in revision history (in DAG of commits). Well, you can tag any object, which is used for example in git.git to store out-of-tree junio GPG key used to sign release tags. -- Jakub Narebski Warsaw, Poland ShadeHawk on #git