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

Re: Git-commits mailing list feed.

From
David A. Wheeler <dwheeler@dwheeler.com>
Date
Apr 25, 2005, 03:32 UTC
Message-ID
<426C64E4.4090600@dwheeler.com>
In-Reply-To
<Pine.LNX.4.58.0504241938410.18901@ppc970.osdl.org>
On Mon, 25 Apr 2005, Fabian Franz wrote:
 >> What about just <sha1 hash of object>.sig or <sha1 hash of object>.asc?

If you mean "hash of object being signed", the problem is that there may be more than one signature of a given object. Keys get stolen, for example, so you want to re-sign the objects. Yes, you could replace the files, but it's nicer to make it so there's never a need to replace files in the first place. That's one of the nice properties of the git object database; so if we can have that property everywhere, I think we should.

Instead, store the signatures in the normal object database, &
give it type "signature".  To speed access FROM a commit or tag
to a signature (and FROM a commit to a tag), create a
separate reverse directory that tells you what objects reference
a given object.  Like this:
.git/
   objects/
     00/
       0195297c2a6336c2007548f909769e0862b509  <= a commit object
     02/
       0395297c2a6336c2007548f909769e0862b509  <= signature of commit
     04/
       0595297c2a6336c2007548f909769e0862b509  <= a tag
     06/
       0795297c2a6336c2007548f909769e0862b509  <= signature of tag
   reverse/
     00/
       0195297c2a6336c2007548f909769e0862b509/
         020395297c2a6336c2007548f909769e0862b509  "this signs commit"
         .... other later signatures of this commit go here.
     04/
       0595297c2a6336c2007548f909769e0862b509/
         060795297c2a6336c2007548f909769e0862b509
         .... other later signatures of this tag go here.

The reverse directory's contents are basically the filenames. The files themselves could be symlinks back up, or not. Content-free files are probably more portable across filesystems, and it's probably also good for space efficiency (though I haven't examined that carefully).

"git"'s knowledge of signatures should be VERY limited, and not dependent on PGP. I think that'd be easy. You could prepend some signature data into the "signature" file to make it much easier to reconstruct the reverse directory and to make it easy to check things WITHOUT knowledge of PGP or whatever.

Here's potential output:

$ cat-file commit 000195297c2a6336c2007548f909769e0862b509 tree 2aaf94eae20acc451553766f3c063bc46cfa75c6 parent dc459bf85b3ff97333e759d641c5d18f4dad470d author Petr Baudis <pasky@ucw.cz> 1114303479 +0200 committer Petr Baudis <xpasky@machine.sinus.cz> 1114303479 +0200

    Added the whatsit flag.

$ cat-file signature 000195297c2a6336c2007548f909769e0862b509 signatureof commit 000195297c2a6336c2007548f909769e0862b509 signer Petr Baudis <pasky@ucw.cz>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQBCbFaRCxlT/+f+SU4RAgYSAKCWpPNlDKDkxuuA649zJop7WkQPnACdF1Fg JgXatbJU8YJ7JHqvgyGepRU= =Kttg -----END PGP SIGNATURE-----

$
--- David A. Wheeler
Previous: Linus TorvaldsNext: David Greaves
Message 30 of 55 in “Re: Git-commits mailing list feed.”
  1. David WoodhouseApr 21, 2005
  2. Linus TorvaldsApr 23, 2005
  3. Linus TorvaldsApr 23, 2005
  4. Fabian FranzApr 23, 2005
  5. Andreas GalApr 23, 2005
  6. SeanApr 23, 2005
  7. Thomas GlanzmannApr 23, 2005
  8. SeanApr 23, 2005
  9. Linus TorvaldsApr 23, 2005
  10. Thomas GlanzmannApr 23, 2005
  11. Linus TorvaldsApr 23, 2005
  12. SeanApr 23, 2005
  13. Linus TorvaldsApr 23, 2005
  14. SeanApr 23, 2005
  15. Linus TorvaldsApr 23, 2005
  16. Junio C HamanoApr 23, 2005
  17. Linus TorvaldsApr 23, 2005
  18. Junio C HamanoApr 23, 2005
  19. Paul JakmaApr 24, 2005
  20. Paul JakmaApr 24, 2005
  21. David A. WheelerApr 25, 2005
  22. Paul JakmaApr 25, 2005
  23. David A. WheelerApr 25, 2005
  24. Paul JakmaApr 25, 2005
  25. Paul JakmaApr 25, 2005
  26. Linus TorvaldsApr 25, 2005
  27. Fabian FranzApr 25, 2005
  28. Andreas GalApr 25, 2005
  29. Linus TorvaldsApr 25, 2005
  30. David A. WheelerApr 25, 2005
  31. David GreavesApr 25, 2005
  32. David A. WheelerApr 25, 2005
  33. Paul JakmaApr 25, 2005
  34. Paul JakmaApr 25, 2005
  35. Paul JakmaApr 25, 2005
  36. New option (-H) for rpush/rpull to update HEADAndreas Gal, Apr 25, 2005
  37. Daniel BarkalowApr 25, 2005
  38. Andreas GalApr 25, 2005
  39. Daniel BarkalowApr 25, 2005
  40. Matt DomschApr 25, 2005
  41. Jan HarkesApr 25, 2005
  42. Thomas GlanzmannApr 23, 2005
  43. Thomas GlanzmannApr 23, 2005
  44. Jan HarkesApr 23, 2005
  45. Linus TorvaldsApr 23, 2005
  46. Junio C HamanoApr 23, 2005
  47. Jan HarkesApr 23, 2005
  48. Linus TorvaldsApr 23, 2005
  49. Jan HarkesApr 23, 2005
  50. Git transfer protocols (was: Re: Git-commits mailing list feed)Mike Taht, Apr 23, 2005
  51. Jan HarkesApr 23, 2005
  52. Linus TorvaldsApr 23, 2005
  53. Suggestion: generalize signed tags into "assertion objects"David A. Wheeler, Apr 23, 2005
  54. Jeff GarzikApr 23, 2005
  55. David WoodhouseApr 25, 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.