aboutsummaryrefslogtreecommitdiffstats
path: root/refs.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-05-17 10:18:39 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-17 10:33:38 -0700
commite19488a60aab022ca4c8d32d6629c04ce94f2779 (patch)
treec1d38f4475913be4d2033a2cd902d2f53a61cc35 /refs.h
parent965f8991e59d84ba1b86e528f9c27852e746fa90 (diff)
downloadgit-e19488a60aab022ca4c8d32d6629c04ce94f2779.tar.gz
refs: refactor `resolve_gitlink_ref()` to accept a repository
In `resolve_gitlink_ref()` we implicitly rely on `the_repository` to look up the submodule ref store. Now that we can look up submodule ref stores for arbitrary repositories we can improve this function to instead accept a repository as parameter for which we want to resolve the gitlink. Do so and adjust callers accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/refs.h b/refs.h
index 346a81e9e3..90a7e2dde3 100644
--- a/refs.h
+++ b/refs.h
@@ -141,8 +141,9 @@ int peel_iterated_oid(const struct object_id *base, struct object_id *peeled);
* successful, return 0 and set oid to the name of the object;
* otherwise, return a non-zero value.
*/
-int resolve_gitlink_ref(const char *submodule, const char *refname,
- struct object_id *oid);
+int repo_resolve_gitlink_ref(struct repository *r,
+ const char *submodule, const char *refname,
+ struct object_id *oid);
/*
* Return true iff abbrev_name is a possible abbreviation for