diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-06-14 08:50:13 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-06-14 19:26:33 +0200 |
commit | 9c34eb93fba703e74f06d20f5b36a1a5e3dc6486 (patch) | |
tree | bca28f26a6fdd7eebd872ca733ac7af9ed7dc86b /cache-tree.c | |
parent | hash: make `is_null_oid()` independent of `the_repository` (diff) | |
download | git-9c34eb93fba703e74f06d20f5b36a1a5e3dc6486.tar.xz git-9c34eb93fba703e74f06d20f5b36a1a5e3dc6486.zip |
hash: require hash algorithm in `is_empty_{blob,tree}_oid()`
Both functions `is_empty_{blob,tree}_oid()` 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>
Diffstat (limited to 'cache-tree.c')
-rw-r--r-- | cache-tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cache-tree.c b/cache-tree.c index e4255c4d02..3290a1b8dd 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -422,7 +422,7 @@ static int update_one(struct cache_tree *it, /* * "sub" can be an empty tree if all subentries are i-t-a. */ - if (contains_ita && is_empty_tree_oid(oid)) + if (contains_ita && is_empty_tree_oid(oid, the_repository->hash_algo)) continue; strbuf_grow(&buffer, entlen + 100); |