hash: require hash algorithm in oidread()
and oidclr()
Both `oidread()` and `oidclr()` use `the_repository` to derive the hash function that shall be used. Require callers to pass in the hash algorithm to get rid of this implicit dependency. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
f4836570a7
commit
9da95bda74
@ -2078,7 +2078,8 @@ static void check_object(struct object_entry *entry, uint32_t object_index)
|
||||
oidread(&base_ref,
|
||||
use_pack(p, &w_curs,
|
||||
entry->in_pack_offset + used,
|
||||
NULL));
|
||||
NULL),
|
||||
the_repository->hash_algo);
|
||||
have_base = 1;
|
||||
}
|
||||
entry->in_pack_header_size = used + the_hash_algo->rawsz;
|
||||
|
Reference in New Issue
Block a user