git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Daniel Barkalow <barkalow@iabervon.org>,
	Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <junkio@cox.net>,
	ftpadmin@kernel.org
Subject: Re: Tags
Date: Sat, 2 Jul 2005 15:17:07 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0507021501450.8247@g5.osdl.org> (raw)
In-Reply-To: <42C70A5B.9070606@zytor.com>



On Sat, 2 Jul 2005, H. Peter Anvin wrote:
> 
> OK, so let me retell what I think I hear you say:
> 
> - Store all the tags in the object store; they may conflict.

No. They cannot conflict.

A git "tag object" cannmot conflict in any way. It is just a generic 
"pointer object", and like all other objects, it is defined by its 
contents, and there are no "conflicts". If two people have exactly the 
same pointer, they'll just have the same object - that's not a conflict, 
that's just a fact of life with content-addressable filesystems.

The git "tag object" contains a suggested symbolic name, but that actually 
has no meaning except as being informational. So for example:

	[torvalds@g5 linux]$ git-cat-file tag v2.6.12
	object 9ee1c939d1cb936b1f98e8d81aeffab57bae46ab
	type commit
	tag v2.6.12
	
	This is the final 2.6.12 release
	-----BEGIN PGP SIGNATURE-----
	Version: GnuPG v1.2.4 (GNU/Linux)
	
	iD8DBQBCsykyF3YsRnbiHLsRAvPNAJ482tCZwuxp/bJRz7Q98MHlN83TpACdHr37
	o6X/3T+vm8K3bf3driRr34c=
	=sBHn
	-----END PGP SIGNATURE-----

here the "symbolic name" is "v2.6.12", but that's purely informational, 
and nothing at all cares if a million people have made their own tags that 
have that same tag-name. The git _object_ is:

	[torvalds@g5 linux]$ git-rev-parse v2.6.12
	26791a8bcf0e6d33f43aef7682bdb555236d56de

and that object name is going to be unique (modulo hash collissions)

> - Let each source user have a set of refs, and provide a method for the 
> end user to select which refs to get.

Right. Let users have any damn refs they want. They may be refs to tags
objects, but they may just be direct refs to the commit. The tag object 
really has no meaning to git, except it allows signing. That's really the 
_only_ thing a tag object does: it introduces trust. There's no other 
reason to ever use one, really.

And a "tag ref" thing is really nothing more (and nothing less) than a
branch. It's a 41-byte filename, although if you actually were to have a
"gitforge" deamon, it could also be just the raw 20-byte SHA1 in a
database. Let people have their own refs, and have some good way to create
them and delete them, and copy them from others (and refer to other
peoples refs - one common usage might be "I want to merge with that other
users ref 'xyzzy'".

Note that the .git/refs/tags/xxx files are _literally_ treated exactly the 
same as the same files under "heads". Or under "mydir". Git really doesn't 
care, it's purely syntactic sugar. To git, a ref is a ref is a ref. It 
just refers to an object, and it's nothing more than a way to specify some 
random SHA1 at any time.

> In other words, the only way (other than knowing what GPG keys to trust) 
> to distinguish between your "v2.6.12" and J. Random Hacker's "v2.6.12" 
> is that the former is referenced by *your* refs as opposed to JRH's 
> refs.  This also means the refs cannot be uniquely rebuilt from the 
> object storage.

Right. All the refs are personal and "fleeting" - some refs are actively
changed all the time (branch refs - aka "heads" - get updated when you
update the branch). Tags are really the same way in all technical ways,
and the only real difference between a "branch ref" and a "tag ref" is
your _expectation_ of them - one you expect to be mostly stable, the other
you expect to be updated with development. _Technically_ there's no
difference between the two, though.

(And you might also change tag contents occasionally. One reason might be
a bug and you decide to re-tag something else. But a more common reason
might be because you want to have tags like "latest" that don't actually
update with development, but they update with some other event, like a
release event or some automated test cycle completion or something like
that. So tags aren't _immutable_ even from an expectation standpoint, 
it's just that they tend to change _less_).

Now, from tag _objects_ (as opposed to tag refs) you _can_ build them if
somebody created a tag object, and you have the signature so that you can
re-associate the tag-name with the person. But you should consider that a
pretty heavy and unusual case. The normal case is that you just want to
back up peoples refs. They're like a part of a personal ".gitrc": you
could equally well think of them as "these are my shorthands, because I
don't want to talk about 40-digit hex numbers all the time". It's nothing
more than a personal address book, really.

		Linus

  parent reply	other threads:[~2005-07-02 22:19 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30 17:54 "git-send-pack" Linus Torvalds
2005-06-30 18:24 ` "git-send-pack" A Large Angry SCM
2005-06-30 18:27   ` "git-send-pack" A Large Angry SCM
2005-06-30 19:04   ` "git-send-pack" Linus Torvalds
2005-06-30 18:45 ` "git-send-pack" Jan Harkes
2005-06-30 19:01 ` "git-send-pack" Mike Taht
2005-06-30 19:42   ` "git-send-pack" Linus Torvalds
2005-07-01  9:50     ` "git-send-pack" Matthias Urlichs
2005-06-30 19:44 ` "git-send-pack" Linus Torvalds
2005-06-30 20:38   ` "git-send-pack" Junio C Hamano
2005-06-30 21:05     ` "git-send-pack" Daniel Barkalow
2005-06-30 21:29       ` "git-send-pack" Linus Torvalds
2005-06-30 21:55         ` "git-send-pack" H. Peter Anvin
2005-06-30 22:26           ` "git-send-pack" Linus Torvalds
2005-06-30 23:40             ` "git-send-pack" H. Peter Anvin
2005-07-01  0:02               ` "git-send-pack" Linus Torvalds
2005-07-01  1:24                 ` "git-send-pack" H. Peter Anvin
2005-07-01 23:44                 ` "git-send-pack" Mike Taht
2005-07-02  0:07                   ` "git-send-pack" H. Peter Anvin
2005-07-02  1:56                   ` "git-send-pack" Linus Torvalds
2005-07-02  4:08                     ` "git-send-pack" H. Peter Anvin
2005-07-02  4:22                       ` "git-send-pack" Linus Torvalds
2005-07-02  4:29                         ` "git-send-pack" H. Peter Anvin
2005-07-02 17:16                           ` "git-send-pack" Linus Torvalds
2005-07-02 17:37                             ` "git-send-pack" H. Peter Anvin
2005-07-02 17:44                             ` "git-send-pack" Tony Luck
2005-07-02 17:48                               ` "git-send-pack" H. Peter Anvin
2005-07-02 18:12                                 ` "git-send-pack" A Large Angry SCM
2005-06-30 22:25         ` "git-send-pack" Daniel Barkalow
2005-06-30 23:56           ` "git-send-pack" Linus Torvalds
2005-07-01  5:01             ` "git-send-pack" Daniel Barkalow
2005-06-30 21:08     ` "git-send-pack" Linus Torvalds
2005-06-30 21:10     ` "git-send-pack" Dan Holmsand
2005-06-30 19:49 ` "git-send-pack" Daniel Barkalow
2005-06-30 20:12   ` "git-send-pack" Linus Torvalds
2005-06-30 20:23     ` "git-send-pack" H. Peter Anvin
2005-06-30 20:52       ` "git-send-pack" Linus Torvalds
2005-06-30 21:23         ` "git-send-pack" H. Peter Anvin
2005-06-30 21:26           ` "git-send-pack" H. Peter Anvin
2005-06-30 21:42           ` "git-send-pack" Linus Torvalds
2005-06-30 22:00             ` "git-send-pack" H. Peter Anvin
2005-07-01 10:31               ` "git-send-pack" Matthias Urlichs
2005-07-01 14:43                 ` "git-send-pack" Jan Harkes
2005-07-01 13:56               ` Tags Eric W. Biederman
2005-07-01 16:37                 ` Tags H. Peter Anvin
2005-07-01 22:38                   ` Tags Eric W. Biederman
2005-07-01 22:44                     ` Tags H. Peter Anvin
2005-07-01 23:07                       ` Tags Eric W. Biederman
2005-07-01 23:22                         ` Tags Daniel Barkalow
2005-07-02  0:06                         ` Tags H. Peter Anvin
2005-07-02  7:00                           ` Tags Eric W. Biederman
2005-07-02 17:47                             ` Tags H. Peter Anvin
2005-07-02 17:54                               ` Tags Eric W. Biederman
2005-07-02 17:58                                 ` Tags H. Peter Anvin
2005-07-02 18:31                                   ` Tags Eric W. Biederman
2005-07-02 19:55                                     ` Tags Matthias Urlichs
2005-07-02 21:16                                     ` Tags H. Peter Anvin
2005-07-02 21:39                                       ` Tags Linus Torvalds
2005-07-02 21:42                                         ` Tags H. Peter Anvin
2005-07-02 22:02                                           ` Tags A Large Angry SCM
2005-07-02 22:20                                             ` Tags Linus Torvalds
2005-07-02 23:49                                               ` Tags A Large Angry SCM
2005-07-03  0:17                                                 ` Tags Linus Torvalds
2005-07-02 22:14                                           ` Tags Petr Baudis
2005-07-02 22:17                                           ` Linus Torvalds [this message]
2005-07-03  0:04                                             ` Tags Dan Holmsand
2005-07-03 22:34                                               ` Tags Kevin Smith
2005-07-05 13:04                                             ` Tags Eric W. Biederman
2005-07-05 16:21                                               ` Tags Daniel Barkalow
2005-07-05 17:51                                                 ` Tags Eric W. Biederman
2005-07-05 18:33                                                   ` Tags Linus Torvalds
2005-07-05 19:22                                                     ` Tags Junio C Hamano
2005-07-06 18:04                                                       ` Tags Matthias Urlichs
2005-07-07  3:31                                                     ` Tags Eric W. Biederman
2005-07-02 18:45                                   ` Tags Linus Torvalds
2005-07-02 20:38                           ` Tags Jan Harkes
2005-07-02 22:32                             ` Tags Jan Harkes
2005-07-02 16:00                       ` Tags Matthias Urlichs
2005-07-01 18:09                 ` Tags Petr Baudis
2005-07-01 18:37                   ` Tags H. Peter Anvin
2005-07-01 21:20                     ` Tags Matthias Urlichs
2005-07-01 21:42                     ` Tags Petr Baudis
2005-07-01 21:52                       ` Tags H. Peter Anvin
2005-07-01 22:27                         ` Tags Daniel Barkalow
2005-07-01 22:59                         ` Tags Petr Baudis
2005-06-30 20:49     ` "git-send-pack" Daniel Barkalow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0507021501450.8247@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=barkalow@iabervon.org \
    --cc=ebiederm@xmission.com \
    --cc=ftpadmin@kernel.org \
    --cc=git@vger.kernel.org \
    --cc=hpa@zytor.com \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).