| 3773 | } |
| 3774 | |
| 3775 | static void indegree_walk_step(struct rev_info *revs) |
| 3776 | { |
| 3777 | struct commit_list *p; |
| 3778 | struct topo_walk_info *info = revs->topo_walk_info; |
| 3779 | struct commit *c = prio_queue_get(&info->indegree_queue); |
| 3780 | |
| 3781 | if (!c) |
| 3782 | return; |
| 3783 | |
| 3784 | if (repo_parse_commit_gently(revs->repo, c, 1) < 0) |
| 3785 | return; |
| 3786 | |
| 3787 | count_indegree_walked++; |
| 3788 | |
| 3789 | explore_to_depth(revs, commit_graph_generation(c)); |
| 3790 | |
| 3791 | for (p = c->parents; p; p = p->next) { |
| 3792 | struct commit *parent = p->item; |
| 3793 | int *pi = indegree_slab_at(&info->indegree, parent); |
| 3794 | |
| 3795 | if (repo_parse_commit_gently(revs->repo, parent, 1) < 0) |
| 3796 | return; |
| 3797 | |
| 3798 | if (*pi) |
| 3799 | (*pi)++; |
| 3800 | else |
| 3801 | *pi = 2; |
| 3802 | |
| 3803 | test_flag_and_insert(&info->indegree_queue, parent, TOPO_WALK_INDEGREE); |
| 3804 | |
| 3805 | if (revs->first_parent_only) |
| 3806 | return; |
| 3807 | } |
| 3808 | } |
| 3809 | |
| 3810 | static void compute_indegrees_to_depth(struct rev_info *revs, |
| 3811 | timestamp_t gen_cutoff) |
no test coverage detected