hash: require hash algorithm in empty_tree_oid_hex()
The `empty_tree_oid_hex()` function 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. While at it, remove the unused `empty_blob_oid_hex()` function. 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
9c34eb93fb
commit
7abbca0e74
@ -557,7 +557,7 @@ static int get_modified_files(struct repository *r,
|
||||
s.skip_unseen = filter && i;
|
||||
|
||||
opt.def = is_initial ?
|
||||
empty_tree_oid_hex() : oid_to_hex(&head_oid);
|
||||
empty_tree_oid_hex(the_repository->hash_algo) : oid_to_hex(&head_oid);
|
||||
|
||||
repo_init_revisions(r, &rev, NULL);
|
||||
setup_revisions(0, NULL, &rev, &opt);
|
||||
|
Reference in New Issue
Block a user