diff options
Diffstat (limited to 'commit-reach.c')
-rw-r--r-- | commit-reach.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/commit-reach.c b/commit-reach.c index 9f79ce0a22..a9da65c462 100644 --- a/commit-reach.c +++ b/commit-reach.c @@ -529,8 +529,8 @@ int commit_contains(struct ref_filter *filter, struct commit *commit, static int compare_commits_by_gen(const void *_a, const void *_b) { - const struct commit *a = (const struct commit *)_a; - const struct commit *b = (const struct commit *)_b; + const struct commit *a = *(const struct commit * const *)_a; + const struct commit *b = *(const struct commit * const *)_b; if (a->generation < b->generation) return -1; @@ -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; } |