pack-bitmap: switch hash tables to use struct object_id
Instead of storing unsigned char pointers in the hash tables, switch to storing instances of struct object_id. Update several internal functions and one external function to take pointers to struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
9941e920e0
commit
3c7714485d
@ -1487,6 +1487,7 @@ static int can_reuse_delta(const unsigned char *base_sha1,
|
||||
struct object_entry **base_out)
|
||||
{
|
||||
struct object_entry *base;
|
||||
struct object_id base_oid;
|
||||
|
||||
if (!base_sha1)
|
||||
return 0;
|
||||
@ -1508,10 +1509,9 @@ static int can_reuse_delta(const unsigned char *base_sha1,
|
||||
* even if it was buried too deep in history to make it into the
|
||||
* packing list.
|
||||
*/
|
||||
if (thin && bitmap_has_sha1_in_uninteresting(bitmap_git, base_sha1)) {
|
||||
oidread(&base_oid, base_sha1);
|
||||
if (thin && bitmap_has_oid_in_uninteresting(bitmap_git, &base_oid)) {
|
||||
if (use_delta_islands) {
|
||||
struct object_id base_oid;
|
||||
hashcpy(base_oid.hash, base_sha1);
|
||||
if (!in_same_island(&delta->idx.oid, &base_oid))
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user