Re: [PATCH v3 02/20] commit-graph: fix GRAPH_MIN_SIZE
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- May 26, 2018, 20:30 UTC
- Message-ID
- <20180526203036.GL652292@genre.crustytoothpaste.net>
- In-Reply-To
- <868t861ci6.fsf@gmail.com>
On Sat, May 26, 2018 at 08:46:09PM +0200, Jakub Narebski wrote:
Show 5 quoted lines
> One issue: in the future when Git moves to NewHash, it could encounter > then both commit-graph files using SHA-1 and using NewHash. What about > GRPH_OID_LEN then: for one of those it would be incorrect. Unless it is > about minimal length of checksum, that is we assume that NewHash would > be longer than SHA-1, but ten why name it GRAPH_OID_LEN?
My proposal is that whatever we're using in the .git directory is consistent. If we're using SHA-1 for objects, then everything is SHA-1. If we're using NewHash for objects, then all data is stored in NewHash (except translation tables and such). Any conversions between SHA-1 and NewHash require a lookup through the standard techniques.
I agree that here it would be more helpful if it were a reference to the_hash_algo, and I've applied a patch to my object-id-part14 series to make that conversion.
-- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204