X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=shallow.c;h=7fd04afed19af7de9dc1438b328567d0b7f2b2b4;hb=HEAD;hp=7ff50dd0da45e00ac3de5e03af473ff361d33b02;hpb=372aabe91285b8c50eaf513488fa2c3c529c1eec;p=thirdparty%2Fgit.git diff --git a/shallow.c b/shallow.c index 7ff50dd0da..a0b181ba8a 100644 --- 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; }