"brian m. carlson" [off-list ref] writes:
I just noticed this because I'm now getting to the case where we write
(and sign) both SHA-1 and SHA-256 versions of commits and I thought I'd
better send in a patch sooner rather than later, since there's a lot
more prep work (surprise) before we get to anything interesting.
Uncomfortably excited to hear this ;-)
On 2021-01-12 at 02:03:08, Junio C Hamano wrote:
"brian m. carlson" [off-list ref] writes:
quoted
I just noticed this because I'm now getting to the case where we write
(and sign) both SHA-1 and SHA-256 versions of commits and I thought I'd
better send in a patch sooner rather than later, since there's a lot
more prep work (surprise) before we get to anything interesting.
Uncomfortably excited to hear this ;-)
Here's a brief summary of what's ahead:
* struct object_id is going to have an algorithm member.
* Consequently, there will be per-algorithm null OIDs.
* To efficiently compare and copy OIDs of all sizes (notably in khash
tables, where things otherwise become tricky), we'll zero-pad SHA-1
OIDs and always compare the full buffer.
* For all of these reasons, oidread (or similar) will become practically
required.
* Objects will be mapped into the loose object store when written, and
each type of object will have a function to convert it between formats
if required.
* The testsuite will learn a mode not to stuff invalid OIDs into things,
since those will no longer work (because those OIDs can't be mapped
and so we can't create SHA-1 versions of them). That will necessitate
another large set of prerequisite additions in the testsuite.
In progress work can be seen on the transition-interop branch at
https://github.com/bk2204/git.git. I should point out that it is very
in progress; the tip will definitely fail the testsuite in certain
cases.
--
brian m. carlson (he/him or they/them)
Houston, Texas, US