]> git.ipfire.org Git - thirdparty/git.git/blobdiff - shallow.c
The sixth batch
[thirdparty/git.git] / shallow.c
index 7ff50dd0da45e00ac3de5e03af473ff361d33b02..a0b181ba8a1636019d481c0bee850104f2a45973 100644 (file)
--- a/shallow.c
+++ b/shallow.c
@@ -678,8 +678,10 @@ void assign_shallow_commits_to_refs(struct shallow_info *info,
         * connect to old refs. If not (e.g. force ref updates) it'll
         * have to go down to the current shallow commits.
         */
-       head_ref(mark_uninteresting, NULL);
-       for_each_ref(mark_uninteresting, NULL);
+       refs_head_ref(get_main_ref_store(the_repository), mark_uninteresting,
+                     NULL);
+       refs_for_each_ref(get_main_ref_store(the_repository),
+                         mark_uninteresting, NULL);
 
        /* Mark potential bottoms so we won't go out of bound */
        for (i = 0; i < nr_shallow; i++) {
@@ -782,8 +784,8 @@ static void post_assign_shallow(struct shallow_info *info,
        info->nr_theirs = dst;
 
        memset(&ca, 0, sizeof(ca));
-       head_ref(add_ref, &ca);
-       for_each_ref(add_ref, &ca);
+       refs_head_ref(get_main_ref_store(the_repository), add_ref, &ca);
+       refs_for_each_ref(get_main_ref_store(the_repository), add_ref, &ca);
 
        /* Remove unreachable shallow commits from "ours" */
        for (i = dst = 0; i < info->nr_ours; i++) {
@@ -822,8 +824,10 @@ int delayed_reachability_test(struct shallow_info *si, int c)
                        struct commit_array ca;
 
                        memset(&ca, 0, sizeof(ca));
-                       head_ref(add_ref, &ca);
-                       for_each_ref(add_ref, &ca);
+                       refs_head_ref(get_main_ref_store(the_repository),
+                                     add_ref, &ca);
+                       refs_for_each_ref(get_main_ref_store(the_repository),
+                                         add_ref, &ca);
                        si->commits = ca.commits;
                        si->nr_commits = ca.nr;
                }