News for hackers. Stuff that matters.
Re:Git 3.0's upcoming SHA-256 default will be a costly mistake by alerighi on Friday October 02, 2026 @10:29AM (#49933942)
If you rely on the commit SHA-1 as a integrity verification it's your problem. Git was never intended to be used as an integrity check.
Re:Git 3.0's upcoming SHA-256 default will be a costly mistake by zygentoma on Friday October 02, 2026 @10:53AM (#49934184)
Git was maybe never intended to be used as an integrity check, but SHA hashes definitely were and are.

And if git provides a cryptographic hash over the content, I don't see why it shouldn't be used to verify the integrity of the checked-out content.

Re:Git 3.0's upcoming SHA-256 default will be a costly mistake by foldr on Saturday October 03, 2026 @09:59AM (#49944333)
The reason why not is very simple: the SHA-1 algorithm was chosen because it made it practically impossible for two commits to have the same hash, not on the assumption that it would remain forever immune to collision attacks.

A vulnerability can be found in a hash algorithm at any time, whereas changing git's hashing algorithm is inevitably a slow process. IMO, if you want to ensure that someone gets an exact set of files, zip it up and sign the archive with the algorithm of your choice. It's not necessarily going to be practical to change git's signing algorithm every time a security issue is found.

Re:Git 3.0's upcoming SHA-256 default will be a costly mistake by onraglanroad on Friday October 02, 2026 @01:43PM (#49936308)
I think perhaps you used the wrong words there. The hash is an integrity check but it was never intended as a security check.