(Delayed) step 7, reachability test at commit level */
| 873 | |
| 874 | /* (Delayed) step 7, reachability test at commit level */ |
| 875 | int delayed_reachability_test(struct shallow_info *si, int c) |
| 876 | { |
| 877 | if (si->need_reachability_test[c]) { |
| 878 | struct commit *commit = lookup_commit(the_repository, |
| 879 | &si->shallow->oid[c]); |
| 880 | |
| 881 | if (!si->commits.nr) { |
| 882 | refs_head_ref(get_main_ref_store(the_repository), |
| 883 | add_ref, &si->commits); |
| 884 | refs_for_each_ref(get_main_ref_store(the_repository), |
| 885 | add_ref, &si->commits); |
| 886 | } |
| 887 | |
| 888 | si->reachable[c] = repo_in_merge_bases_many(the_repository, |
| 889 | commit, |
| 890 | si->commits.nr, |
| 891 | si->commits.items, |
| 892 | 1); |
| 893 | if (si->reachable[c] < 0) |
| 894 | exit(128); |
| 895 | si->need_reachability_test[c] = 0; |
| 896 | } |
| 897 | return si->reachable[c]; |
| 898 | } |
no test coverage detected