|
|
Subscribe / Log in / New account

Whatever happened to SHA-256 support in Git?

Whatever happened to SHA-256 support in Git?

Posted Dec 31, 2022 7:29 UTC (Sat) by luto (guest, #39314)
Parent article: Whatever happened to SHA-256 support in Git?

I don’t understand why interoperability can’t exist. Imagine a hybrid repository: objects can be hashed with any algorithm (SHA-1 or SHA-256). Objects hashed with SHA-256 can refer to any object, but objects hashed with SHA-1 can only refer to other objects hashed with SHA-1. You can also add a rule, per-repo, that commits claiming to be after a certain date or (transitively) referring to commits past a certain date can’t refer to trees that (transitively) refer to SHA-1 objects.

This means that conversion to SHA-256 is more or less an all-in affair. You start adding any SHA-256 objects, and you very quickly can’t add any new SHA-1 objects. But you could convert.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds