diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-06-14 08:49:54 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-14 10:26:32 -0700 |
| commit | 9da95bda74cf10e1475384a71fd20914c3b99784 (patch) | |
| tree | fb145c3883d83c86ecf5bf7fa188937afe77b1e0 /object-file.c | |
| parent | f4836570a7adbd8c70ad7a8edf6ae5a977647c06 (diff) | |
| download | git-9da95bda74cf10e1475384a71fd20914c3b99784.tar.gz | |
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>
Diffstat (limited to 'object-file.c')
| -rw-r--r-- | object-file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/object-file.c b/object-file.c index a40300ce4a..c161e3e2a5 100644 --- a/object-file.c +++ b/object-file.c @@ -1446,7 +1446,7 @@ static int loose_object_info(struct repository *r, int allow_unknown = flags & OBJECT_INFO_ALLOW_UNKNOWN_TYPE; if (oi->delta_base_oid) - oidclr(oi->delta_base_oid); + oidclr(oi->delta_base_oid, the_repository->hash_algo); /* * If we don't care about type or size, then we don't @@ -1580,7 +1580,7 @@ static int do_oid_object_info_extended(struct repository *r, if (oi->disk_sizep) *(oi->disk_sizep) = 0; if (oi->delta_base_oid) - oidclr(oi->delta_base_oid); + oidclr(oi->delta_base_oid, the_repository->hash_algo); if (oi->type_name) strbuf_addstr(oi->type_name, type_name(co->type)); if (oi->contentp) |
