On 8/18/2019 4:04 PM, brian m. carlson wrote: > Instead of hard-coding the hash size, use the_hash_algo to look up the > hash size at runtime. Remove the #define constant which was used to > hold the hash length, since writing the expression with the_hash_algo > provide enough documentary value on its own. Thanks for this change! It seems to be very similar to the one included in the commit-graph, barring one small issue below (that we can follow-up on later). > diff --git a/midx.c b/midx.c > index d649644420..f29afc0d2d 100644 > --- a/midx.c > +++ b/midx.c > @@ -19,8 +19,7 @@ > #define MIDX_BYTE_NUM_PACKS 8 > #define MIDX_HASH_VERSION 1 This hash version "1" is the same as we used in the commit-graph. It's a byte value from the file format, and we've already discussed how it would have been better to use the 4-byte identifier, but that ship has sailed. I'm just pointing this out to say that we are not done in this file yet, but we can get to that when we want to test the midx with multiple hash lengths. > #define MIDX_HEADER_SIZE 12 > -#define MIDX_HASH_LEN 20 The replacements of MIDX_HASH_LEN make sense. Thanks! -Stolee