Re: [PATCH 4/9] midx: keep track of the checksum
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Feb 11, 2021, 02:33 UTC
- Message-ID
- <d03263c7-56d3-575c-4ab7-56a617daf34a@gmail.com>
- In-Reply-To
- <b4b842fa1e8c711af30cc93b6f1100661791416c.1612998106.git.me@ttaylorr.com>
On 2/10/21 6:02 PM, Taylor Blau wrote:
> + unsigned char midx_hash[GIT_MAX_RAWSZ];
I was initially thinking we should use something like 'struct object_id' here, but the hash we are storing doesn't correspond to an object, which would be confusing. I suppose this is the most correct thing to do.
> - finalize_hashfile(f, NULL, CSUM_FSYNC | CSUM_HASH_IN_STREAM); > + finalize_hashfile(f, midx_hash, CSUM_FSYNC | CSUM_HASH_IN_STREAM);
And this is of course correct. The issue will be what happens to 'midx_hash' in the later changes. Will keep reading.
Thanks, -Stolee