Moving Git past SHA-1
Moving Git past SHA-1
Posted Feb 28, 2017 14:59 UTC (Tue) by garyvdm (subscriber, #82325)In reply to: Moving Git past SHA-1 by andrewsh
Parent article: Moving Git past SHA-1
I think (I'm not 100%) that the object ids are not stored in the pack file, only in the pack index. The pack file can be enumerated, and the object ids can be calculated. Hence it would be possible to have one pack file, and multiple index files for each object id type. Such a repo might look like this:
.git/
objects/
pack
pack-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.idx
pack-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.idx-sha3
pack-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pack
Posted Feb 28, 2017 15:11 UTC (Tue)
by nix (subscriber, #2304)
[Link]
But the mapping from SHA-1 IDs to object offsets in each pack is computed at receive time and stored in the index. (This means that every object lookup must check each index in turn, which is why occasionally repacking them into a single big pack without actually recompressing any content at all is still a significant win.)
Moving Git past SHA-1
