4 ms·
Anyone know how the migration is intended to work? I'm guessing that git's storage model includes a table of SHA-1 hashes to object files/locations, and it will
by phyzome 8y ago
Anyone know how the migration is intended to work? I'm guessing that git's storage model includes a table of SHA-1 hashes to object files/locations, and it will just need another lookup table... and then what? Maybe a fallback to SHA-1 hash to verify objects in older repos?
- avar 8y agoIt's explained here: https://github.com/git/git/blob/master/Documentation/technical/hash-function-transition.txt https://github.com/git/git/blob/master/Documentation/technic...
- craftyguy 8y agoUnless I missed it, it doesn't seem to address the usage of shortened sha1 hashes. It seems like sha1 hashes will stay in the repo, so how does it know if 'abcd12345' is sha1 or sha256?
- shakna 8y agoI believe the SHA-1 hashes get 'translated' into SHA-256. [0] So though SHA-1 references stay in the repo, the preference is for SHA-256 hashes. But, an edge-case like this may not get a full explanation until implementation. They go into it a bit more here. [1] Where what they mean may change depending on the transition timeline. To begin with, prefer SHA-1, but convert internally to SHA256. Output names to users in SHA-1 still. Only late in the transition begin to use the SHA256 names. However, the mode of operation can be changed by your git config. [0] https://github.com/git/git/blob/master/Documentation/technical/hash-function-transition.txt#L289 https://github.com/git/git/blob/master/Documentation/technic... [1] https://github.com/git/git/blob/master/Documentation/technical/hash-function-transition.txt#L567 https://github.com/git/git/blob/master/Documentation/technic...