refs/files: stop using the_repository
in parse_loose_ref_contents()
We implicitly rely on `the_repository` in `parse_loose_ref_contents()` by calling `parse_oid_hex()`. Convert the function to instead use `parse_oid_hex_algop()` and have 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:

committed by
Junio C Hamano

parent
f777f4d884
commit
080b068ffb
4
refs.c
4
refs.c
@ -1752,8 +1752,8 @@ static int refs_read_special_head(struct ref_store *ref_store,
|
||||
goto done;
|
||||
}
|
||||
|
||||
result = parse_loose_ref_contents(content.buf, oid, referent, type,
|
||||
failure_errno);
|
||||
result = parse_loose_ref_contents(ref_store->repo->hash_algo, content.buf,
|
||||
oid, referent, type, failure_errno);
|
||||
|
||||
done:
|
||||
strbuf_release(&full_path);
|
||||
|
Reference in New Issue
Block a user