summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-04-21 05:54:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-05-10 07:30:28 (GMT)
commit38ef7507d1dce87d68f177a6209d716339fee854 (patch)
tree8a3c9c26be0ecaaba899aed6d9a9d154157b7f01
parentc99f069de2f06b7abe0406c2ff1b46621dbc9398 (diff)
downloadgit-38ef7507d1dce87d68f177a6209d716339fee854.zip
git-38ef7507d1dce87d68f177a6209d716339fee854.tar.gz
git-38ef7507d1dce87d68f177a6209d716339fee854.tar.bz2
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>
-rw-r--r--bisect.h1
-rw-r--r--builtin-rev-list.c32
2 files changed, 15 insertions, 18 deletions
diff --git a/bisect.h b/bisect.h
index 908e362..0b5d122 100644
--- a/bisect.h
+++ b/bisect.h
@@ -16,7 +16,6 @@ extern void print_commit_list(struct commit_list *list,
/* bisect_show_flags flags in struct rev_list_info */
#define BISECT_SHOW_ALL (1<<0)
#define BISECT_SHOW_TRIED (1<<1)
-#define BISECT_SHOW_STRINGED (1<<2)
struct rev_list_info {
struct rev_info *revs;
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 35f88ca..31ea5f4 100644
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
@@ -235,26 +235,26 @@ void print_commit_list(struct commit_list *list,
}
}
-static void show_tried_revs(struct commit_list *tried, int stringed)
+static void show_tried_revs(struct commit_list *tried)
{
printf("bisect_tried='");
print_commit_list(tried, "%s|", "%s");
- printf(stringed ? "' &&\n" : "'\n");
+ printf("'\n");
}
-static void print_var_str(const char *var, const char *val, int stringed)
+static void print_var_str(const char *var, const char *val)
{
- printf("%s='%s'%s\n", var, val, stringed ? " &&" : "");
+ printf("%s='%s'\n", var, val);
}
-static void print_var_int(const char *var, int val, int stringed)
+static void print_var_int(const char *var, int val)
{
- printf("%s=%d%s\n", var, val, stringed ? " &&" : "");
+ printf("%s=%d\n", var, val);
}
int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
{
- int cnt, stringed, flags = info->bisect_show_flags;
+ int cnt, flags = info->bisect_show_flags;
char hex[41] = "";
struct commit_list *tried;
struct rev_info *revs = info->revs;
@@ -285,17 +285,15 @@ int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
printf("------\n");
}
- stringed = flags & BISECT_SHOW_STRINGED;
-
if (flags & BISECT_SHOW_TRIED)
- show_tried_revs(tried, stringed);
-
- print_var_str("bisect_rev", hex, stringed);
- print_var_int("bisect_nr", cnt - 1, stringed);
- print_var_int("bisect_good", all - reaches - 1, stringed);
- print_var_int("bisect_bad", reaches - 1, stringed);
- print_var_int("bisect_all", all, stringed);
- print_var_int("bisect_steps", estimate_bisect_steps(all), 0);
+ show_tried_revs(tried);
+
+ print_var_str("bisect_rev", hex);
+ print_var_int("bisect_nr", cnt - 1);
+ print_var_int("bisect_good", all - reaches - 1);
+ print_var_int("bisect_bad", reaches - 1);
+ print_var_int("bisect_all", all);
+ print_var_int("bisect_steps", estimate_bisect_steps(all));
return 0;
}