summaryrefslogtreecommitdiff
path: root/builtin-rev-list.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-04-07 03:08:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-04-08 05:12:44 (GMT)
commit13858e5770dd218e5318819d3273c916b46cf8e5 (patch)
treed7f907bdc8f9b14e2e8da7080d58b58badd041e2 /builtin-rev-list.c
parentd797257eb280b67dd1f7153a66b03453c0fb927a (diff)
downloadgit-13858e5770dd218e5318819d3273c916b46cf8e5.zip
git-13858e5770dd218e5318819d3273c916b46cf8e5.tar.gz
git-13858e5770dd218e5318819d3273c916b46cf8e5.tar.bz2
rev-list: add "int bisect_show_flags" in "struct rev_list_info"
This is a cleanup patch to make it easier to use the "show_bisect_vars" function and take advantage of the rev_list_info struct. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-rev-list.c')
-rw-r--r--builtin-rev-list.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 244b73e..193993c 100644
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
@@ -233,10 +233,9 @@ static void show_tried_revs(struct commit_list *tried, int stringed)
printf(stringed ? "' &&\n" : "'\n");
}
-int show_bisect_vars(struct rev_list_info *info, int reaches, int all,
- int flags)
+int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
{
- int cnt;
+ int cnt, flags = info->bisect_show_flags;
char hex[41] = "", *format;
struct commit_list *tried;
struct rev_info *revs = info->revs;
@@ -303,7 +302,6 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
int bisect_list = 0;
int bisect_show_vars = 0;
int bisect_find_all = 0;
- int bisect_show_all = 0;
int quiet = 0;
git_config(git_default_config, NULL);
@@ -334,7 +332,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
if (!strcmp(arg, "--bisect-all")) {
bisect_list = 1;
bisect_find_all = 1;
- bisect_show_all = 1;
+ info.bisect_show_flags = BISECT_SHOW_ALL;
revs.show_decorations = 1;
continue;
}
@@ -387,8 +385,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
bisect_find_all);
if (bisect_show_vars)
- return show_bisect_vars(&info, reaches, all,
- bisect_show_all ? BISECT_SHOW_ALL : 0);
+ return show_bisect_vars(&info, reaches, all);
}
traverse_commit_list(&revs,