Re: [PATCH v6 0/5] Reftable support git-core
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Feb 27, 2020, 00:01 UTC
- Message-ID
- <20200227000130.GE7911@camp.crustytoothpaste.net>
- In-Reply-To
- <CAFQ2z_P8Ph_f0CbYHYZm0XVyk+ax+Dv_-FrSSyLBkB-xn-uupA@mail.gmail.com>
On 2020-02-26 at 17:16:01, Han-Wen Nienhuys wrote:
Show 16 quoted lines
> On Fri, Feb 21, 2020 at 7:40 AM Jonathan Nieder <jrnieder@gmail.com> wrote: > > > 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. > > > [...] > > > * 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.
Show 5 quoted lines
> 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