pack-bitmap: make bitmap header handling hash agnostic

Increase the checksum field in struct bitmap_disk_header to be
GIT_MAX_RAWSZ bytes in length and ensure that we hash the proper number
of bytes out when computing the bitmap checksum.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
brian m. carlson
2019-02-19 00:04:54 +00:00
committed by Junio C Hamano
parent 5a8643eff1
commit 0f4d6cada8
3 changed files with 3 additions and 3 deletions

View File

@ -163,7 +163,7 @@ static int load_bitmap_header(struct bitmap_index *index)
}
index->entry_count = ntohl(header->entry_count);
index->map_pos += sizeof(*header);
index->map_pos += sizeof(*header) - GIT_MAX_RAWSZ + the_hash_algo->rawsz;
return 0;
}