Skip to content

Commit 2f9bbb6

Browse files
abhishekkumar2718gitster
authored andcommitted
revision: parse parent in indegree_walk_step()
In indegree_walk_step(), we add unvisited parents to the indegree queue. However, parents are not guaranteed to be parsed. As the indegree queue sorts by generation number, let's parse parents before inserting them to ensure the correct priority order. Signed-off-by: Abhishek Kumar <[email protected]> Reviewed-by: Taylor Blau <[email protected]> Reviewed-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e30c5ee commit 2f9bbb6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

revision.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3373,6 +3373,9 @@ static void indegree_walk_step(struct rev_info *revs)
33733373
struct commit *parent = p->item;
33743374
int *pi = indegree_slab_at(&info->indegree, parent);
33753375

3376+
if (repo_parse_commit_gently(revs->repo, parent, 1) < 0)
3377+
return;
3378+
33763379
if (*pi)
33773380
(*pi)++;
33783381
else

0 commit comments

Comments
 (0)