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
2
apply.c
2
apply.c
@ -3680,7 +3680,7 @@ static int try_threeway(struct apply_state *state,
|
||||
if (status) {
|
||||
patch->conflicted_threeway = 1;
|
||||
if (patch->is_new)
|
||||
oidclr(&patch->threeway_stage[0]);
|
||||
oidclr(&patch->threeway_stage[0], the_repository->hash_algo);
|
||||
else
|
||||
oidcpy(&patch->threeway_stage[0], &pre_oid);
|
||||
oidcpy(&patch->threeway_stage[1], &our_oid);
|
||||
|
Reference in New Issue
Block a user