From: Junio C Hamano Date: Mon, 17 Sep 2018 20:54:00 +0000 (-0700) Subject: Merge branch 'nd/bisect-show-list-fix' X-Git-Tag: v2.20.0-rc0~228 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1966cda6f4fb91fdba34cb60efdd47bc105f2086?ds=inline;hp=-c Merge branch 'nd/bisect-show-list-fix' Debugging aid update. * nd/bisect-show-list-fix: bisect.c: make show_list() build again --- 1966cda6f4fb91fdba34cb60efdd47bc105f2086 diff --combined bisect.c index 958e72c6b9,e65f6821b8..e8b17cf7e1 --- a/bisect.c +++ b/bisect.c @@@ -13,7 -13,7 +13,8 @@@ #include "sha1-array.h" #include "argv-array.h" #include "commit-slab.h" +#include "commit-reach.h" + #include "object-store.h" static struct oid_array good_revs; static struct oid_array skipped_revs; @@@ -121,14 -121,14 +122,14 @@@ static inline int halfway(struct commit } } - #if !DEBUG_BISECT - #define show_list(a,b,c,d) do { ; } while (0) - #else static void show_list(const char *debug, int counted, int nr, struct commit_list *list) { struct commit_list *p; + if (!DEBUG_BISECT) + return; + fprintf(stderr, "%s (%d/%d)\n", debug, counted, nr); for (p = list; p; p = p->next) { @@@ -146,7 -146,7 +147,7 @@@ (flags & TREESAME) ? ' ' : 'T', (flags & UNINTERESTING) ? 'U' : ' ', (flags & COUNTED) ? 'C' : ' '); - if (commit->util) + if (*commit_weight_at(&commit_weight, p->item)) fprintf(stderr, "%3d", weight(p)); else fprintf(stderr, "---"); @@@ -161,7 -161,6 +162,6 @@@ fprintf(stderr, "\n"); } } - #endif /* DEBUG_BISECT */ static struct commit_list *best_bisection(struct commit_list *list, int nr) { @@@ -596,7 -595,7 +596,7 @@@ static struct commit_list *skip_away(st for (i = 0; cur; cur = cur->next, i++) { if (i == index) { - if (oidcmp(&cur->item->object.oid, current_bad_oid)) + if (!oideq(&cur->item->object.oid, current_bad_oid)) return cur; if (previous) return previous; @@@ -808,7 -807,7 +808,7 @@@ static void check_merge_bases(int rev_n for (; result; result = result->next) { const struct object_id *mb = &result->item->object.oid; - if (!oidcmp(mb, current_bad_oid)) { + if (oideq(mb, current_bad_oid)) { handle_bad_merge_base(); } else if (0 <= oid_array_lookup(&good_revs, mb)) { continue; @@@ -989,7 -988,7 +989,7 @@@ int bisect_next_all(const char *prefix bisect_rev = &revs.commits->item->object.oid; - if (!oidcmp(bisect_rev, current_bad_oid)) { + if (oideq(bisect_rev, current_bad_oid)) { exit_if_skipped_commits(tried, current_bad_oid); printf("%s is the first %s commit\n", oid_to_hex(bisect_rev), term_bad);