aboutsummaryrefslogtreecommitdiffstats
path: root/refs.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-07-30 07:22:51 +0200
committerJunio C Hamano <gitster@pobox.com>2024-07-30 13:41:23 -0700
commit080b068ffb72a41ea23d11a6a5781e587db7d860 (patch)
tree5264554a0f91d3b802d42945be926c98b3bad08b /refs.c
parentrefs: stop using `the_repository` (diff)
downloadgit-080b068ffb72a41ea23d11a6a5781e587db7d860.tar.gz
git-080b068ffb72a41ea23d11a6a5781e587db7d860.zip
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>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/refs.c b/refs.c
index 94a41934d6..e082fc59b0 100644
--- a/refs.c
+++ b/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);