News: 0001458650

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Git 2.45 Begins Landing Code For SHA1 & SHA256 Interoperability For Repositories

([Programming] 4 Hours Ago Git 2.45-rc0 Released)


Junio Hamano announced the release today of Git 2.45-rc0 as the first test release toward the next version of this distributed version control system. Notable with Git 2.45 is beginning to land SHA1 and SHA256 interoperability work for repositories.

Git 2.45 has been working on various optimizations, various sub-command improvements, and a number of fixes to this tool widely used by open-source developers and others. Catching my interest in the Git 2.45-rc0 announcement was:

"Work to support a repository that work with both SHA-1 and SHA-256 hash algorithms has started."

Git has long supported [1]support for using more secure SHA256 hashes rather than SHA1. Albeit it's not been the default and to date there hasn't been interoperability support for existing repositories that are SHA1-based. But with Git 2.45 the very initial patches have begun landing for supporting the SHA1 and SHA256 interoperability for hashes within the same repository.

In particular, merged for Git 2.45-rc0 were some of the patches laid out within the " [2]SHA256 and SHA1 interoperability " patch series. Eric Biederman explained in that Git patch series that has been baking since last year:

"A key part of the hash function transition plan is a way that a single git repository can inter-operate with git repositories whose storage hash function is SHA-1 and git repositories whose storage hash function is SHA-256.

This interoperability can defined in terms of two repositories one whose storage hash function is SHA-1 and another whose storage hash function is SHA-256. Those two repositories receive exactly the same objects, but they store them in different but equivalent ways.

For a repository that has one storage hash function to inter-operate with a repository that has a different storage hash function requires the first repository to be able produce it's objects as if they were stored in the second hash function.

This series of changes focuses on implementing the pieces that allow a repository that uses one storage hash function to produce the objects that would have been stored with a second storage hash function.

The final patch in this series is the addition of a test that creates two repositories one that uses SHA-1 as it's storage hash function and the other that uses SHA-256 as it's storage hash function. Identical operations are performed on the two repositories, and their compatibility objects are compared to verify they are the same. AKA the SHA-1 repository on the fly generates the objects store in the SHA-256 repository, and the SHA-256 repository on the fly generates the objects that are stored in the SHA-1 repository."

Great seeing this initial work by Eric Biederman and Brian Carlson land for the Git 2.45 series! The full list of Git 2.45-rc0 patches can be found via today's [3]release announcement .



[1] https://www.phoronix.com/news/Git-2.29-With-SHA-256

[2] https://lore.kernel.org/all/878r8l929e.fsf@gmail.froward.int.ebiederm.org/

[3] https://lore.kernel.org/lkml/xmqqcyqljmuu.fsf@gitster.g/T/#u



pWe00Iri3e7Z9lHOX2Qx

uid313

discordian

spicfoo

nanonyme

aviallon

Shick's Law:
There is no problem a good miracle can't solve.