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
@ -1938,7 +1938,7 @@ static void print_bases(struct base_tree_info *bases, FILE *file)
|
||||
free(bases->patch_id);
|
||||
bases->nr_patch_id = 0;
|
||||
bases->alloc_patch_id = 0;
|
||||
oidclr(&bases->base_commit);
|
||||
oidclr(&bases->base_commit, the_repository->hash_algo);
|
||||
}
|
||||
|
||||
static const char *diff_title(struct strbuf *sb,
|
||||
|
Reference in New Issue
Block a user