@matheusbsbs / matheus-bagliano / commits / 38ef7507d1
Fork 0

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>

Christian Couder committed Apr 21, 2009 at 07:54 UTC 38ef7507d1dce87d68f177a6209d716339fee854
2 files changed +15 -18
bisect.h
-1
@@ -16,7 +16,6 @@ extern void print_commit_list(struct commit_list *list,
16 /* bisect_show_flags flags in struct rev_list_info */
17 #define BISECT_SHOW_ALL (1<<0)
18 #define BISECT_SHOW_TRIED (1<<1)
19 -#define BISECT_SHOW_STRINGED (1<<2)
19
20 struct rev_list_info {
21 struct rev_info *revs;
builtin-rev-list.c
+15 -17
@@ -235,26 +235,26 @@ void print_commit_list(struct commit_list *list,
235 }
236 }
237
238 -static void show_tried_revs(struct commit_list *tried, int stringed)
238 +static void show_tried_revs(struct commit_list *tried)
239 {
240 printf("bisect_tried='");
241 print_commit_list(tried, "%s|", "%s");
242 - printf(stringed ? "' &&\n" : "'\n");
242 + printf("'\n");
243 }
244
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)
246 {
247 - printf("%s='%s'%s\n", var, val, stringed ? " &&" : "");
247 + printf("%s='%s'\n", var, val);
248 }
249
250 -static void print_var_int(const char *var, int val, int stringed)
250 +static void print_var_int(const char *var, int val)
251 {
252 - printf("%s=%d%s\n", var, val, stringed ? " &&" : "");
252 + printf("%s=%d\n", var, val);
253 }
254
255 int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
256 {
257 - int cnt, stringed, flags = info->bisect_show_flags;
257 + int cnt, flags = info->bisect_show_flags;
258 char hex[41] = "";
259 struct commit_list *tried;
260 struct rev_info *revs = info->revs;
@@ -285,17 +285,15 @@ int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
285 printf("------\n");
286 }
287
288 - stringed = flags & BISECT_SHOW_STRINGED;
289 -
288 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));
297
298 return 0;
299 }