On Sun, Feb 26, 2017 at 12:18:34AM -0500, Jeff King wrote: > On Sun, Feb 26, 2017 at 01:13:59AM +0000, Jason Cooper wrote: > > > On Fri, Feb 24, 2017 at 10:10:01PM -0800, Junio C Hamano wrote: > > > I was thinking we would need mixed mode support for smoother > > > transition, but it now seems to me that the approach to stratify the > > > history into old and new is workable. > > > > As someone looking to deploy (and having previously deployed) git in > > unconventional roles, I'd like to add one caveat. The flag day in the > > history is great, but I'd like to be able to confirm the integrity of > > the old history. > > > > "Counter-hashing" the blobs is easy enough, but the trees, commits and > > tags would need to have, iiuc, some sort of cross-reference. As in my > > previous example, "git tag -v v3.16" also checks the counter hash to > > further verify the integrity of the history (yes, it *really* needs to > > check all of the old hashes, but I'd like to make sure I can do step one > > first). > > > > Would there be opposition to counter-hashing the old commits at the flag > > day? > > I don't think a counter-hash needs to be embedded into the git objects > themselves. If the "modern" repo format stores everything primarily as > sha-256, say, it will probably need to maintain a (local) mapping table > of sha1/sha256 equivalence. That table can be generated at any time from > the object data (though I suspect we'll keep it up to date as objects > enter the repository). I really like this look-aside approach. I think it makes it really easy to just rewrite the history internally, but still be able to verify signed commits and signed tags. We could even synthesize the blobs and trees from the new hash versions if we didn't want to store them. This essentially avoids the need for handling competing hashes in the same object (and controversy about multihash or other storage facilities); just specify the new hash in the objects, and look up the old one in the database if necessary. This also will be the easiest approach to implement, IMHO. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | https://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: https://keybase.io/bk2204
Attachment:
signature.asc
Description: PGP signature