Skip to content

Commit 1966cda

Browse files
committed
Merge branch 'nd/bisect-show-list-fix'
Debugging aid update. * nd/bisect-show-list-fix: bisect.c: make show_list() build again
2 parents d39cab3 + b0eb92b commit 1966cda

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bisect.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "argv-array.h"
1515
#include "commit-slab.h"
1616
#include "commit-reach.h"
17+
#include "object-store.h"
1718

1819
static struct oid_array good_revs;
1920
static struct oid_array skipped_revs;
@@ -121,14 +122,14 @@ static inline int halfway(struct commit_list *p, int nr)
121122
}
122123
}
123124

124-
#if !DEBUG_BISECT
125-
#define show_list(a,b,c,d) do { ; } while (0)
126-
#else
127125
static void show_list(const char *debug, int counted, int nr,
128126
struct commit_list *list)
129127
{
130128
struct commit_list *p;
131129

130+
if (!DEBUG_BISECT)
131+
return;
132+
132133
fprintf(stderr, "%s (%d/%d)\n", debug, counted, nr);
133134

134135
for (p = list; p; p = p->next) {
@@ -146,7 +147,7 @@ static void show_list(const char *debug, int counted, int nr,
146147
(flags & TREESAME) ? ' ' : 'T',
147148
(flags & UNINTERESTING) ? 'U' : ' ',
148149
(flags & COUNTED) ? 'C' : ' ');
149-
if (commit->util)
150+
if (*commit_weight_at(&commit_weight, p->item))
150151
fprintf(stderr, "%3d", weight(p));
151152
else
152153
fprintf(stderr, "---");
@@ -161,7 +162,6 @@ static void show_list(const char *debug, int counted, int nr,
161162
fprintf(stderr, "\n");
162163
}
163164
}
164-
#endif /* DEBUG_BISECT */
165165

166166
static struct commit_list *best_bisection(struct commit_list *list, int nr)
167167
{

0 commit comments

Comments
 (0)