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 /commit-reach.c | |
| parent | Merge branch 'rj/header-guards' (diff) | |
| parent | commit-reach: fix first-parent heuristic (diff) | |
| download | git-68fa2ebd65e72725cc8c6cc03de964d36da26bf7.tar.gz git-68fa2ebd65e72725cc8c6cc03de964d36da26bf7.zip | |
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
Diffstat (limited to 'commit-reach.c')
| -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; } |
