oidset: pass hash algorithm when parsing file

The `oidset_parse_file_carefully()` function implicitly depends on
`the_repository` when parsing object IDs. Fix this by having callers
pass in the hash algorithm to use.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-06-14 08:50:42 +02:00
committed by Junio C Hamano
parent afa2c6ddc8
commit f2c32a66f5
4 changed files with 11 additions and 5 deletions

3
fsck.c
View File

@@ -205,7 +205,8 @@ void fsck_set_msg_types(struct fsck_options *options, const char *values)
if (!strcmp(buf, "skiplist")) {
if (equal == len)
die("skiplist requires a path");
oidset_parse_file(&options->skiplist, buf + equal + 1);
oidset_parse_file(&options->skiplist, buf + equal + 1,
the_repository->hash_algo);
buf += len + 1;
continue;
}