summaryrefslogtreecommitdiff
path: root/bisect.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-09-17 20:54:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-17 20:54:00 (GMT)
commit1966cda6f4fb91fdba34cb60efdd47bc105f2086 (patch)
tree63ee233fb92f9f2b889aecd97969e9ab680f7c89 /bisect.c
parentd39cab3989f9e660cae124f78143369b13ad2901 (diff)
parentb0eb92bbc297348a47cc25bdd9d32ab338289359 (diff)
downloadgit-1966cda6f4fb91fdba34cb60efdd47bc105f2086.zip
git-1966cda6f4fb91fdba34cb60efdd47bc105f2086.tar.gz
git-1966cda6f4fb91fdba34cb60efdd47bc105f2086.tar.bz2
Merge branch 'nd/bisect-show-list-fix'
Debugging aid update. * nd/bisect-show-list-fix: bisect.c: make show_list() build again
Diffstat (limited to 'bisect.c')
-rw-r--r--bisect.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bisect.c b/bisect.c
index 958e72c..e8b17cf 100644
--- a/bisect.c
+++ b/bisect.c
@@ -14,6 +14,7 @@
#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 +122,14 @@ static inline int halfway(struct commit_list *p, int nr)
}
}
-#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 +147,7 @@ static void show_list(const char *debug, int counted, int nr,
(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 +162,6 @@ static void show_list(const char *debug, int counted, int nr,
fprintf(stderr, "\n");
}
}
-#endif /* DEBUG_BISECT */
static struct commit_list *best_bisection(struct commit_list *list, int nr)
{