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
@ -93,7 +93,8 @@ struct string_list *resolve_undo_read(const char *data, unsigned long size)
|
||||
continue;
|
||||
if (size < rawsz)
|
||||
goto error;
|
||||
oidread(&ui->oid[i], (const unsigned char *)data);
|
||||
oidread(&ui->oid[i], (const unsigned char *)data,
|
||||
the_repository->hash_algo);
|
||||
size -= rawsz;
|
||||
data += rawsz;
|
||||
}
|
||||
|
Reference in New Issue
Block a user