diff options
Diffstat (limited to 'bisect.c')
-rw-r--r-- | bisect.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -15,14 +15,13 @@ static struct sha1_array good_revs; static struct sha1_array skipped_revs; -static const unsigned char *current_bad_sha1; +static unsigned char *current_bad_sha1; static const char *argv_checkout[] = {"checkout", "-q", NULL, "--", NULL}; static const char *argv_show_branch[] = {"show-branch", NULL, NULL}; static const char *argv_update_ref[] = {"update-ref", "--no-deref", "BISECT_HEAD", NULL, NULL}; -/* bits #0-15 in revision.h */ - +/* Remember to update object flag allocation in object.h */ #define COUNTED (1u<<16) /* @@ -404,10 +403,11 @@ static int register_ref(const char *refname, const unsigned char *sha1, int flags, void *cb_data) { if (!strcmp(refname, "bad")) { - current_bad_sha1 = sha1; - } else if (!prefixcmp(refname, "good-")) { + current_bad_sha1 = xmalloc(20); + hashcpy(current_bad_sha1, sha1); + } else if (starts_with(refname, "good-")) { sha1_array_append(&good_revs, sha1); - } else if (!prefixcmp(refname, "skip-")) { + } else if (starts_with(refname, "skip-")) { sha1_array_append(&skipped_revs, sha1); } @@ -623,7 +623,7 @@ static void bisect_common(struct rev_info *revs) if (prepare_revision_walk(revs)) die("revision walk setup failed"); if (revs->tree_objects) - mark_edges_uninteresting(revs->commits, revs, NULL); + mark_edges_uninteresting(revs, NULL); } static void exit_if_skipped_commits(struct commit_list *tried, @@ -684,7 +684,6 @@ static void mark_expected_rev(char *bisect_rev_hex) static int bisect_checkout(char *bisect_rev_hex, int no_checkout) { - int res; mark_expected_rev(bisect_rev_hex); @@ -695,6 +694,7 @@ static int bisect_checkout(char *bisect_rev_hex, int no_checkout) die("update-ref --no-deref HEAD failed on %s", bisect_rev_hex); } else { + int res; res = run_command_v_opt(argv_checkout, RUN_GIT_CMD); if (res) exit(res); |