aboutsummaryrefslogtreecommitdiffstats
path: root/refs/refs-internal.h
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/refs-internal.h
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/refs-internal.h')
-rw-r--r--refs/refs-internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/refs/refs-internal.h b/refs/refs-internal.h
index fa975d69aa..309b382284 100644
--- a/refs/refs-internal.h
+++ b/refs/refs-internal.h
@@ -705,7 +705,8 @@ struct ref_store {
* Parse contents of a loose ref file. *failure_errno maybe be set to EINVAL for
* invalid contents.
*/
-int parse_loose_ref_contents(const char *buf, struct object_id *oid,
+int parse_loose_ref_contents(const struct git_hash_algo *algop,
+ const char *buf, struct object_id *oid,
struct strbuf *referent, unsigned int *type,
int *failure_errno);