git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Tags

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 3, 2005, 00:17 UTC
Message-ID
<Pine.LNX.4.58.0507021656250.8247@g5.osdl.org>
In-Reply-To
<42C727FC.3030900@gmail.com>
On Sat, 2 Jul 2005, A Large Angry SCM wrote:
Show 9 quoted lines
>
> Linus Torvalds wrote:
> > 
> > None of git itself normally has any "trust". The SHA1 means that the 
> > _integrity_ of the archive is ensured, but for some things (notably 
> > releases), you want to have something else. That's the "tag object".
> > 
> 
> But can't the commit object do this just as well by signing the commit text?
Yes and no.
Technically yes, absolutely, you could add a signature to the commit text.
However, that's just wrong for several reasons:

First off, the signing is not necessarily done by the person committing something. Think of any paperwork: the person that signs the paperwork is not necessarily the same person that _wrote_ the paperwork. A signature is a "witness".

For an example of this, look at the signatures that we've had for a long time on kernel.org: check out the files like "patch-2.6.8.1.sign". That's a signature, but it's not a signature by _me_. It's kernel.org signing the thing so that downstream people can verify things.

And it would be not only wrong, but literally _impossible_ for me to do it in the commit. I don't have (or want to have) the kernel.org private key. That's not what the signature is about. kernel.org is signing that "this is what I got, and what I passed on". It's not signing that "this is what I wrote".

In a lot of systems, you tag something good after it has passed a regression test. Ie the _tag_ may happen days or even weeks after the commit has been done.

So any system that signs commits directly is doing something _wrong_. 

Secondly, you can say that you trust other things. In git, you can tag individual blobs, and you can tag individual trees. For an example of where it makes sense to tag (sign) individual file versions, we've actually had things like ISDN drivers (or firmware) that passed some telco verification suite, and in certain countries it used to be that you weren't legally supposed to use hadrware that hadn't passed that suite. In cases like that, you could sign the particular version of the driver, and say "this one is good".

(Yeah, those laws are happily going away, but I think the ISDN people in germany actually ended up doing exactly that, except they obviously didn't use git signatures. I think they had a list of file+md5sum).

Finally, it's a tools issue. It's wrong to mix up the notion of committing and signing in the same thing, because that just complicates a tool that has to be able to do both. Now you can have a nice graphical commit tool, and it doesn't need to know about public keys etc to be useful - you can use another tool to do the signing.

Small is beautiful, but "independent" is even more so.
> Your tendency is to use tag objects as a permanent, public label of some 
> state. Signing the commit text or the email stating that commit 
> ${COMMIT_SHA} would work just as well for verification purposes.

Well, according to that logic, you'd never need signatures at all - you can always keep them totally outside the system.

But if they are totally outside the system, then you have to have some other mechanism to track them, and you can never trust a git archive on its own. My goal with the tag objects was that you can just get my git archive, and the archive is _inherently_ trustworthy, because if you care, you can verify it without any external input at all (except you need to know my public key, of course, but that's not a tools issue any more, that's about how signatures work).

So by having tag objects, I can just have refs to them, and anything that can fetch a ref (which implies _any_ kind of "pull" functionality) can get it. No special cases. No crap.

Do one thing, and do it well. Git does objects with relationships. That's really what git is all about, and the "tag object" fits very well into that mentality.

		Linus
Previous: A Large Angry SCMNext: Petr Baudis
Message 63 of 86 in “"git-send-pack"”
  1. Linus TorvaldsJun 30, 2005
  2. A Large Angry SCMJun 30, 2005
  3. A Large Angry SCMJun 30, 2005
  4. Linus TorvaldsJun 30, 2005
  5. Jan HarkesJun 30, 2005
  6. Mike TahtJun 30, 2005
  7. Linus TorvaldsJun 30, 2005
  8. Matthias UrlichsJul 1, 2005
  9. Linus TorvaldsJun 30, 2005
  10. Junio C HamanoJun 30, 2005
  11. Daniel BarkalowJun 30, 2005
  12. Linus TorvaldsJun 30, 2005
  13. H. Peter AnvinJun 30, 2005
  14. Linus TorvaldsJun 30, 2005
  15. H. Peter AnvinJun 30, 2005
  16. Linus TorvaldsJul 1, 2005
  17. H. Peter AnvinJul 1, 2005
  18. Mike TahtJul 1, 2005
  19. H. Peter AnvinJul 2, 2005
  20. Linus TorvaldsJul 2, 2005
  21. H. Peter AnvinJul 2, 2005
  22. Linus TorvaldsJul 2, 2005
  23. H. Peter AnvinJul 2, 2005
  24. Linus TorvaldsJul 2, 2005
  25. H. Peter AnvinJul 2, 2005
  26. Tony LuckJul 2, 2005
  27. H. Peter AnvinJul 2, 2005
  28. A Large Angry SCMJul 2, 2005
  29. Daniel BarkalowJun 30, 2005
  30. Linus TorvaldsJun 30, 2005
  31. Daniel BarkalowJul 1, 2005
  32. Linus TorvaldsJun 30, 2005
  33. Dan HolmsandJun 30, 2005
  34. Daniel BarkalowJun 30, 2005
  35. Linus TorvaldsJun 30, 2005
  36. H. Peter AnvinJun 30, 2005
  37. Linus TorvaldsJun 30, 2005
  38. H. Peter AnvinJun 30, 2005
  39. H. Peter AnvinJun 30, 2005
  40. Linus TorvaldsJun 30, 2005
  41. H. Peter AnvinJun 30, 2005
  42. Matthias UrlichsJul 1, 2005
  43. Jan HarkesJul 1, 2005
  44. TagsEric W. Biederman, Jul 1, 2005
  45. H. Peter AnvinJul 1, 2005
  46. Eric W. BiedermanJul 1, 2005
  47. H. Peter AnvinJul 1, 2005
  48. Eric W. BiedermanJul 1, 2005
  49. Daniel BarkalowJul 1, 2005
  50. H. Peter AnvinJul 2, 2005
  51. Eric W. BiedermanJul 2, 2005
  52. H. Peter AnvinJul 2, 2005
  53. Eric W. BiedermanJul 2, 2005
  54. H. Peter AnvinJul 2, 2005
  55. Eric W. BiedermanJul 2, 2005
  56. Matthias UrlichsJul 2, 2005
  57. H. Peter AnvinJul 2, 2005
  58. Linus TorvaldsJul 2, 2005
  59. H. Peter AnvinJul 2, 2005
  60. A Large Angry SCMJul 2, 2005
  61. Linus TorvaldsJul 2, 2005
  62. A Large Angry SCMJul 2, 2005
  63. Linus TorvaldsJul 3, 2005
  64. Petr BaudisJul 2, 2005
  65. Linus TorvaldsJul 2, 2005
  66. Dan HolmsandJul 3, 2005
  67. Kevin SmithJul 3, 2005
  68. Eric W. BiedermanJul 5, 2005
  69. Daniel BarkalowJul 5, 2005
  70. Eric W. BiedermanJul 5, 2005
  71. Linus TorvaldsJul 5, 2005
  72. Junio C HamanoJul 5, 2005
  73. Matthias UrlichsJul 6, 2005
  74. Eric W. BiedermanJul 7, 2005
  75. Linus TorvaldsJul 2, 2005
  76. Jan HarkesJul 2, 2005
  77. Jan HarkesJul 2, 2005
  78. Matthias UrlichsJul 2, 2005
  79. Petr BaudisJul 1, 2005
  80. H. Peter AnvinJul 1, 2005
  81. Matthias UrlichsJul 1, 2005
  82. Petr BaudisJul 1, 2005
  83. H. Peter AnvinJul 1, 2005
  84. Daniel BarkalowJul 1, 2005
  85. Petr BaudisJul 1, 2005
  86. Daniel BarkalowJun 30, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.