Please sign in to comment.
Validate the pack's footer checksum matches that in the index
If the SHA-1 checksum of the entire pack content does not match the checksum stored in the corresponding *.idx file we cannot use the index, as the offsets recorded with it are most likely incorrect. This situation can arise if another application repacks the pack with different compression settings, but puts the same set of objects into it. The offsets are going to be different, but the resulting pack file and index file names will be the same. If we had previously read the old index into memory, but the pack isn't a match anymore, we can't safely access this pack. Signed-off-by: Shawn O. Pearce <email@example.com> Signed-off-by: Robin Rosenberg <firstname.lastname@example.org>
- Loading branch information...
Showing with 19 additions and 1 deletion.