Re: [PATCH v6 0/5] Reftable support git-core
From: brian m. carlson <hidden>
Date: 2020-02-27 00:01:38
On 2020-02-26 at 17:16:01, Han-Wen Nienhuys wrote:
On Fri, Feb 21, 2020 at 7:40 AM Jonathan Nieder [off-list ref] wrote:quoted
quoted
This adds the reftable library, and hooks it up as a ref backend.As promised, here's a patch to include the reftable spec in git.git. Please include this in the next iteration of this patch series (or if you prefer for it to land separately, that's also fine with me).I did.quoted
[...]quoted
* support SHA256 as version 2 of the format.I'd prefer if we error out for now when someone tries to use reftable when the_hash_algo != sha1. That would buy a bit more time to pin down the details of version 2 (e.g., should it only add an object format field, or object format and oid size?).
If we do this, the testsuite will start to fail with SHA-256 unless you label those tests with the SHA1 prerequisite.
You have convinced me that we should go with the 4-byte identifier. How about setting version=2 and extending the header by 4 bytes (which hold the 4-byte identifier). The footer would also be increased in size equivalently. There are no further changes.
Just so you're aware, the values we're going to be using in pack index
version 3 are in sha1-file.c as the format_version values of struct
hash_algo. They're 0x73686131 for SHA-1 ("sha1", big-endian) and
0x73323536 for SHA-256 ("s256", big-endian).
I know Jonathan is already familiar with those, but I thought I'd point
them out since others may not be.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204 Attachments
- signature.asc [application/pgp-signature] 263 bytes