diff options
Diffstat (limited to 'bisect.c')
-rw-r--r-- | bisect.c | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -636,9 +636,10 @@ static void bisect_rev_setup(struct rev_info *revs, const char *prefix, /* XXX leak rev_argv, as "revs" may still be pointing to it */ } -static void bisect_common(struct rev_info *revs) +static void bisect_common(struct rev_info *revs, + struct object_array *old_pending_ptr) { - if (prepare_revision_walk(revs)) + if (prepare_revision_walk_extended(revs, old_pending_ptr)) die("revision walk setup failed"); if (revs->tree_objects) mark_edges_uninteresting(revs, NULL); @@ -819,15 +820,7 @@ static int check_ancestors(const char *prefix) bisect_rev_setup(&revs, prefix, "^%s", "%s", 0); /* Save pending objects, so they can be cleaned up later. */ - pending_copy = revs.pending; - revs.leak_pending = 1; - - /* - * bisect_common calls prepare_revision_walk right away, which - * (together with .leak_pending = 1) makes us the sole owner of - * the list of pending objects. - */ - bisect_common(&revs); + bisect_common(&revs, &pending_copy); res = (revs.commits != NULL); /* Clean up objects used, as they will be reused. */ @@ -958,7 +951,7 @@ int bisect_next_all(const char *prefix, int no_checkout) bisect_rev_setup(&revs, prefix, "%s", "^%s", 1); revs.limited = 1; - bisect_common(&revs); + bisect_common(&revs, NULL); find_bisection(&revs.commits, &reaches, &all, !!skipped_revs.nr); revs.commits = managed_skipped(revs.commits, &tried); |