mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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
@@ -29,7 +29,7 @@ int read_link_extension(struct index_state *istate,
|
||||
if (sz < the_hash_algo->rawsz)
|
||||
return error("corrupt link extension (too short)");
|
||||
si = init_split_index(istate);
|
||||
oidread(&si->base_oid, data);
|
||||
oidread(&si->base_oid, data, the_repository->hash_algo);
|
||||
data += the_hash_algo->rawsz;
|
||||
sz -= the_hash_algo->rawsz;
|
||||
if (!sz)
|
||||
|
||||
Reference in New Issue
Block a user