summaryrefslogtreecommitdiffstats
path: root/submodule.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-05-16 18:48:46 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-16 18:48:46 +0200
commit46536278a8b77de9b8726799c998b4b82ee9a7d9 (patch)
tree4094657e4daa72326ff2efaedd4114d43078102e /submodule.c
parentThe fourth batch (diff)
parentrefs: remove functions without ref store (diff)
downloadgit-46536278a8b77de9b8726799c998b4b82ee9a7d9.tar.xz
git-46536278a8b77de9b8726799c998b4b82ee9a7d9.zip
Merge branch 'ps/refs-without-the-repository' into ps/refs-without-the-repository-updates
* ps/refs-without-the-repository: refs: remove functions without ref store cocci: apply rules to rewrite callers of "refs" interfaces cocci: introduce rules to transform "refs" to pass ref store refs: add `exclude_patterns` parameter to `for_each_fullref_in()` refs: introduce missing functions that accept a `struct ref_store`
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/submodule.c b/submodule.c
index 05d6db9d3d..f6313cd99f 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1242,7 +1242,8 @@ int push_unpushed_submodules(struct repository *r,
char *head;
struct object_id head_oid;
- head = resolve_refdup("HEAD", 0, &head_oid, NULL);
+ head = refs_resolve_refdup(get_main_ref_store(the_repository),
+ "HEAD", 0, &head_oid, NULL);
if (!head)
die(_("Failed to resolve HEAD as a valid ref."));
@@ -1280,7 +1281,8 @@ static int append_oid_to_array(const char *ref UNUSED,
void check_for_new_submodule_commits(struct object_id *oid)
{
if (!initialized_fetch_ref_tips) {
- for_each_ref(append_oid_to_array, &ref_tips_before_fetch);
+ refs_for_each_ref(get_main_ref_store(the_repository),
+ append_oid_to_array, &ref_tips_before_fetch);
initialized_fetch_ref_tips = 1;
}