aboutsummaryrefslogtreecommitdiffstats
path: root/resolve-undo.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-06-14 08:49:54 +0200
committerJunio C Hamano <gitster@pobox.com>2024-06-14 10:26:32 -0700
commit9da95bda74cf10e1475384a71fd20914c3b99784 (patch)
treefb145c3883d83c86ecf5bf7fa188937afe77b1e0 /resolve-undo.c
parentf4836570a7adbd8c70ad7a8edf6ae5a977647c06 (diff)
downloadgit-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 'resolve-undo.c')
-rw-r--r--resolve-undo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/resolve-undo.c b/resolve-undo.c
index cd02dc9928..4e6f0e4676 100644
--- a/resolve-undo.c
+++ b/resolve-undo.c
@@ -93,7 +93,8 @@ struct string_list *resolve_undo_read(const char *data, unsigned long size)
continue;
if (size < rawsz)
goto error;
- oidread(&ui->oid[i], (const unsigned char *)data);
+ oidread(&ui->oid[i], (const unsigned char *)data,
+ the_repository->hash_algo);
size -= rawsz;
data += rawsz;
}