News for hackers. Stuff that matters.
Re:The Git project selects SHA-256 as the next-gen hash func... by phyzome on Wednesday August 22, 2018 @06:04PM (#17822654)
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?
Re:The Git project selects SHA-256 as the next-gen hash func... by avar on Wednesday August 22, 2018 @06:11PM (#17822697)
Re:The Git project selects SHA-256 as the next-gen hash func... by craftyguy on Wednesday August 22, 2018 @08:43PM (#17823582)
Unless 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?
Re:The Git project selects SHA-256 as the next-gen hash func... by shakna on Wednesday August 22, 2018 @08:53PM (#17823635)
I 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/technic...

[1] https://github.com/git/git/blob/master/Documentation/technic...