linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David A. Wheeler" <dwheeler@dwheeler.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Fabian Franz <FabianFranz@gmx.de>, Paul Jakma <paul@clubi.ie>,
	Sean <seanlkml@sympatico.ca>,
	Thomas Glanzmann <sithglan@stud.uni-erlangen.de>,
	David Woodhouse <dwmw2@infradead.org>,
	Jan Dittmer <jdittmer@ppp0.net>, Greg KH <greg@kroah.com>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Git-commits mailing list feed.
Date: Sun, 24 Apr 2005 23:32:52 -0400	[thread overview]
Message-ID: <426C64E4.4090600@dwheeler.com> (raw)
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

  reply	other threads:[~2005-04-25  3:31 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-21  4:22 Git-commits mailing list feed David Woodhouse
2005-04-21  6:24 ` Jan Dittmer
2005-04-21  6:34   ` David Woodhouse
2005-04-22  0:29   ` Greg KH
2005-04-22  8:03     ` Jan Dittmer
2005-04-23 12:58     ` Jan Dittmer
2005-04-23 14:21       ` David Woodhouse
2005-04-23 14:30         ` Jan Dittmer
2005-04-23 14:35           ` David Woodhouse
2005-04-23 17:31             ` Linus Torvalds
2005-04-23 17:45               ` Linus Torvalds
2005-04-23 17:50               ` Fabian Franz
2005-04-23 17:50               ` Sean
2005-04-23 19:02                 ` Thomas Glanzmann
2005-04-23 18:14                   ` Sean
2005-04-23 19:34                 ` Linus Torvalds
2005-04-23 17:54               ` Thomas Glanzmann
2005-04-23 18:30                 ` Linus Torvalds
2005-04-23 18:06                   ` Sean
2005-04-23 19:38                     ` Linus Torvalds
2005-04-23 18:44                       ` Sean
2005-04-23 19:58                         ` Linus Torvalds
2005-04-23 19:57                       ` Junio C Hamano
2005-04-23 20:23                         ` Linus Torvalds
2005-04-23 20:24                         ` Junio C Hamano
2005-04-24 23:25                       ` Paul Jakma
2005-04-24 23:57                         ` Paul Jakma
2005-04-25  1:01                         ` David A. Wheeler
2005-04-25  1:35                           ` Paul Jakma
2005-04-25  2:13                             ` David A. Wheeler
2005-04-25  3:03                               ` Paul Jakma
2005-04-25  3:08                                 ` Paul Jakma
2005-04-25  1:50                           ` Linus Torvalds
2005-04-25  2:17                             ` Fabian Franz
2005-04-25  2:44                               ` Linus Torvalds
2005-04-25  3:32                                 ` David A. Wheeler [this message]
2005-04-25  9:31                                   ` David Greaves
2005-04-25  3:08                             ` David A. Wheeler
2005-04-25  3:24                               ` Paul Jakma
2005-04-25  3:40                                 ` Paul Jakma
2005-04-25  3:47                                   ` Paul Jakma
2005-04-25  2:34                           ` Matt Domsch
2005-04-25  2:43                             ` Jan Harkes
2005-04-23 18:39                   ` Thomas Glanzmann
2005-04-23 18:44                     ` Thomas Glanzmann
2005-04-23 18:46                   ` Jan Harkes
2005-04-23 20:01                     ` Linus Torvalds
2005-04-23 18:54                   ` Junio C Hamano
2005-04-23 18:35                 ` Bernd Eckenfels
2005-04-23 18:34               ` Jan Harkes
2005-04-23 19:30                 ` Linus Torvalds
2005-04-23 20:49                   ` Jan Harkes
2005-04-23 23:29                     ` Linus Torvalds
2005-04-23 20:15               ` Jeff Garzik
2005-04-25  1:26               ` David Woodhouse
2005-05-04  9:02             ` Jan Dittmer
2005-05-04  9:20               ` David Woodhouse
2005-05-04  9:59                 ` Jan Dittmer
2005-05-04 10:42                 ` Jan Dittmer
2005-04-23 14:43         ` Jan Dittmer
2005-04-21 10:29 ` Arjan van de Ven
2005-04-21 12:23   ` David Woodhouse
     [not found] <3WtO4-5GW-5@gated-at.bofh.it>
     [not found] ` <3WtXG-5Nh-9@gated-at.bofh.it>
     [not found]   ` <3WtXG-5Nh-7@gated-at.bofh.it>
     [not found]     ` <3WwLT-848-13@gated-at.bofh.it>
     [not found]       ` <3WxeV-5S-9@gated-at.bofh.it>
     [not found]         ` <3WxHT-pv-1@gated-at.bofh.it>
     [not found]           ` <3Wyb3-Sj-33@gated-at.bofh.it>
     [not found]             ` <3WyDZ-1a6-7@gated-at.bofh.it>
     [not found]               ` <3WYRN-5lJ-9@gated-at.bofh.it>
     [not found]                 ` <3X0gU-6u6-5@gated-at.bofh.it>
     [not found]                   ` <3X1G1-7ug-9@gated-at.bofh.it>
2005-04-25 15:47                     ` Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>

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

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

  git send-email \
    --in-reply-to=426C64E4.4090600@dwheeler.com \
    --to=dwheeler@dwheeler.com \
    --cc=FabianFranz@gmx.de \
    --cc=dwmw2@infradead.org \
    --cc=git@vger.kernel.org \
    --cc=greg@kroah.com \
    --cc=jdittmer@ppp0.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@clubi.ie \
    --cc=seanlkml@sympatico.ca \
    --cc=sithglan@stud.uni-erlangen.de \
    --cc=torvalds@osdl.org \
    /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.
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 NNTP newsgroup(s).