MCPcopy Create free account
hub / github.com/git/git / indegree_walk_step

Function indegree_walk_step

revision.c:3775–3808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3773}
3774
3775static 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
3810static void compute_indegrees_to_depth(struct rev_info *revs,
3811 timestamp_t gen_cutoff)

Callers 1

Calls 5

prio_queue_getFunction · 0.85
repo_parse_commit_gentlyFunction · 0.85
explore_to_depthFunction · 0.85
commit_graph_generationFunction · 0.85
test_flag_and_insertFunction · 0.85

Tested by

no test coverage detected