1 |
On Sun, Jul 5, 2015 at 4:01 PM, William Hubbs <williamh@g.o> wrote: |
2 |
> |
3 |
> I've been hearing lately that the newest versions of git allow you to |
4 |
> sign pushes. |
5 |
> |
6 |
> Once we have a version of git stable that allows this, can someone fill |
7 |
> me in on why we would need to sign commits if we sign pushes? If we have |
8 |
> a signature on the push, we know where that came from, so it seems to be |
9 |
> overkill to sign the commits as well. |
10 |
> |
11 |
|
12 |
Those push signatures aren't actually exposed to users, and I'm not |
13 |
sure if they're really even a part of the repository, but more like a |
14 |
log item. |
15 |
|
16 |
This is a bit like saying "why do we need signed manifests when devs |
17 |
already need an ssh key to commit to cvs?" Push signatures are just |
18 |
another form of authentication for pushing. Commit signatures are |
19 |
bound to the specific changes, and follow the code around if it gets |
20 |
branched/merged/etc (but not rebased). Pushing and committing aren't |
21 |
really the same thing in git, though our single-master workflow tends |
22 |
to make them seem interchangeable. |
23 |
|
24 |
That's my general sense of it. |
25 |
|
26 |
All the gpg stuff really exposes the weakness of git being based on |
27 |
sha1 though. I wouldn't think that it would be that hard to change |
28 |
git's hash function, with the caveat that the resulting repositories |
29 |
might not be backwards-compatible. Just change the various headers |
30 |
from "blob" to "blob-sha256" and so on - the compacted file formats |
31 |
might require a tweak and should have a field added for hash type |
32 |
anytime a hash is used. The old commits with signatures/etc would |
33 |
still be valid - they'd continue to be named by their sha1 hashes and |
34 |
references to them would use a blob/tree/parent/etc header instead of |
35 |
a blob-sha256/tree-sha256/parent-sha256 header and so on. For |
36 |
compatibility make the default to stick with sha1 and the old file |
37 |
formats on an old repository unless a setting is set on it, and |
38 |
deprecate the format. |
39 |
|
40 |
-- |
41 |
Rich |