diff options
| author | Junio C Hamano <gitster@pobox.com> | 2018-10-30 15:43:44 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-10-30 15:43:44 +0900 |
| commit | 68fa2ebd65e72725cc8c6cc03de964d36da26bf7 (patch) | |
| tree | 19653bf7fa14976698a9e022cbc36340bd25ac30 | |
| parent | 0a1006c571fd365d766f97a2e886f543f07bc922 (diff) | |
| parent | b6723e4671acdc6a06ef7672144106cfac4a234f (diff) | |
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
| -rw-r--r-- | commit-reach.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/commit-reach.c b/commit-reach.c index 9f79ce0a22..79419be8af 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -593,8 +593,10 @@ int can_all_from_reach_with_flag(struct object_array *from, while (stack) { struct commit_list *parent; - if (stack->item->object.flags & with_flag) { + if (stack->item->object.flags & (with_flag | RESULT)) { pop_commit(&stack); + if (stack) + stack->item->object.flags |= RESULT; continue; } |
