Skip to content

Commit 38ef750

Browse files
chriscoolgitster
authored andcommitted
rev-list: remove stringed output flag from "show_bisect_vars"
Because it was used only by "git bisect--helper --next-vars" but the "--next-vars" option has been removed. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent c99f069 commit 38ef750

2 files changed

Lines changed: 15 additions & 18 deletions

File tree

bisect.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ extern void print_commit_list(struct commit_list *list,
1616
/* bisect_show_flags flags in struct rev_list_info */
1717
#define BISECT_SHOW_ALL (1<<0)
1818
#define BISECT_SHOW_TRIED (1<<1)
19-
#define BISECT_SHOW_STRINGED (1<<2)
2019

2120
struct rev_list_info {
2221
struct rev_info *revs;

builtin-rev-list.c

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -235,26 +235,26 @@ void print_commit_list(struct commit_list *list,
235235
}
236236
}
237237

238-
static void show_tried_revs(struct commit_list *tried, int stringed)
238+
static void show_tried_revs(struct commit_list *tried)
239239
{
240240
printf("bisect_tried='");
241241
print_commit_list(tried, "%s|", "%s");
242-
printf(stringed ? "' &&\n" : "'\n");
242+
printf("'\n");
243243
}
244244

245-
static void print_var_str(const char *var, const char *val, int stringed)
245+
static void print_var_str(const char *var, const char *val)
246246
{
247-
printf("%s='%s'%s\n", var, val, stringed ? " &&" : "");
247+
printf("%s='%s'\n", var, val);
248248
}
249249

250-
static void print_var_int(const char *var, int val, int stringed)
250+
static void print_var_int(const char *var, int val)
251251
{
252-
printf("%s=%d%s\n", var, val, stringed ? " &&" : "");
252+
printf("%s=%d\n", var, val);
253253
}
254254

255255
int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
256256
{
257-
int cnt, stringed, flags = info->bisect_show_flags;
257+
int cnt, flags = info->bisect_show_flags;
258258
char hex[41] = "";
259259
struct commit_list *tried;
260260
struct rev_info *revs = info->revs;
@@ -285,17 +285,15 @@ int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
285285
printf("------\n");
286286
}
287287

288-
stringed = flags & BISECT_SHOW_STRINGED;
289-
290288
if (flags & BISECT_SHOW_TRIED)
291-
show_tried_revs(tried, stringed);
292-
293-
print_var_str("bisect_rev", hex, stringed);
294-
print_var_int("bisect_nr", cnt - 1, stringed);
295-
print_var_int("bisect_good", all - reaches - 1, stringed);
296-
print_var_int("bisect_bad", reaches - 1, stringed);
297-
print_var_int("bisect_all", all, stringed);
298-
print_var_int("bisect_steps", estimate_bisect_steps(all), 0);
289+
show_tried_revs(tried);
290+
291+
print_var_str("bisect_rev", hex);
292+
print_var_int("bisect_nr", cnt - 1);
293+
print_var_int("bisect_good", all - reaches - 1);
294+
print_var_int("bisect_bad", reaches - 1);
295+
print_var_int("bisect_all", all);
296+
print_var_int("bisect_steps", estimate_bisect_steps(all));
299297

300298
return 0;
301299
}

0 commit comments

Comments
 (0)