mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Merge branch 'tb/midx-use-checksum'
When rebuilding the multi-pack index file reusing an existing one, we used to blindly trust the existing file and ended up carrying corrupted data into the updated file, which has been corrected. * tb/midx-use-checksum: midx: report checksum mismatches during 'verify' midx: don't reuse corrupt MIDXs when writing commit-graph: rewrite to use checksum_valid() csum-file: introduce checksum_valid()
This commit is contained in:
@@ -44,6 +44,9 @@ void hashflush(struct hashfile *f);
|
||||
void crc32_begin(struct hashfile *);
|
||||
uint32_t crc32_end(struct hashfile *);
|
||||
|
||||
/* Verify checksum validity while reading. Returns non-zero on success. */
|
||||
int hashfile_checksum_valid(const unsigned char *data, size_t len);
|
||||
|
||||
/*
|
||||
* Returns the total number of bytes fed to the hashfile so far (including ones
|
||||
* that have not been written out to the descriptor yet).
|
||||
|
||||
Reference in New Issue
Block a user