Skip to content

Commit 68fa2eb

Browse files
committed
Merge branch 'ds/reachable-first-parent-fix'
Correct performance regression in commit ancestry computation when generation numbers are involved. * ds/reachable-first-parent-fix: commit-reach: fix first-parent heuristic
2 parents 0a1006c + b6723e4 commit 68fa2eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

commit-reach.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,10 @@ int can_all_from_reach_with_flag(struct object_array *from,
593593
while (stack) {
594594
struct commit_list *parent;
595595

596-
if (stack->item->object.flags & with_flag) {
596+
if (stack->item->object.flags & (with_flag | RESULT)) {
597597
pop_commit(&stack);
598+
if (stack)
599+
stack->item->object.flags |= RESULT;
598600
continue;
599601
}
600602

0 commit comments

Comments
 (0)