Thread (1 message) 1 message, 1 author, 2023-09-12

Re: [RFC][PATCH 0/32] SHA256 and SHA1 interoperability

From: Eric W. Biederman <hidden>
Date: 2023-09-12 21:19:26

"brian m. carlson" [off-list ref] writes:
On 2023-09-11 at 16:13:27, Eric W. Biederman wrote:
quoted
Junio, brian for the very warm reception of this, it is very
encouraging.

I am not worried about what it will take time to get the changes I
posted into the integration.  I had only envisioned them as good enough
to get the technical ideas across, and had never envisioned them as
being accepted as is.

What I am envisioning as my future directions are:

- Post non controversial cleanups, so they can be merged.
  (I can only see about 4 of them the most significant is:
   bulk-checkin: Only accept blobs)

- Sort out the configuration options

- Post the smallest patchset I can that will allow testing the code in
  object-file-convert.c.  Unfortunately for that I need configuration
  options to enable the mapping.

  In starting to write the tests I have already found a bug in
  the conversion of tags (an extra newline is added), and I haven't
  even gotten to testing the tricky bits with signatures.
I wonder if unit tests are a possibility here now that we're starting to
use them.  They're not obligatory, of course, but it may be more
convenient for you if they turn out to be a suitable option.  If not, no
big deal.
I believe you mean using test-tool and making a very narrow focused test
on just the functionality.

If the number of patches I have to go through before I can test anything
becomes a problem I might go there.  Unfortunately it would take some
refactoring to make object-file-convert independent of the object
mapping layer, and that is extra work and is likely to introduces bugs
as anything.

I have managed to get a set of tests working.  I am just going through
now and plugging the holes.

My big strategy for testing convert_object_file is to build two
repositories one sha1 and the other sha256 both with compatibility
support enabled.  I add a series of objects to those repositories and
compare them to ensure the objects are identical.

It is working well and is finding bugs not just in convert_object_file
but in code such as commit and tag that perform interesting work with
signed commits.

I discovered I had bungled the placement of hash_object_file for
the compatibility hash in commit.

I found that git tag did not yet support building tags with both
hash algorithms.

Right now I am looking at commits with mergetag lines.  It is not fun.
The mergetag instead of pointing to the tag objects they include the
body of the tag objects in the commit object.  So I have convert
the embedded tag objects from one hash function to another.
Which given the presence of preceding space on every line of
the embedded tag object makes it doubly interesting.  Perhaps
someone has already written code to extract the embedded tag.

Or in short everything is moving along steadily.

Eric
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help