summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d797257)
raw | patch | inline | side by side (parent: d797257)
author | Christian Couder <chriscool@tuxfamily.org> | |
Tue, 7 Apr 2009 03:08:42 +0000 (05:08 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 8 Apr 2009 05:12:44 +0000 (22:12 -0700) |
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>
"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>
bisect.c | patch | blob | history | |
bisect.h | patch | blob | history | |
builtin-rev-list.c | patch | blob | history |
diff --git a/bisect.c b/bisect.c
index 4d2a150df2da769a20a70b909fdc905fc5000583..58f7e6f7738def184072247f934cce06d349c91d 100644 (file)
--- a/bisect.c
+++ b/bisect.c
memset(&info, 0, sizeof(info));
info.revs = &revs;
+ info.bisect_show_flags = BISECT_SHOW_TRIED | BISECT_SHOW_STRINGED;
bisect_rev_setup(&revs, prefix);
revs.commits = find_bisection(revs.commits, &reaches, &all,
!!skipped_sha1_nr);
- return show_bisect_vars(&info, reaches, all,
- BISECT_SHOW_TRIED | BISECT_SHOW_STRINGED);
+ return show_bisect_vars(&info, reaches, all);
}
diff --git a/bisect.h b/bisect.h
index b1c334d3492ca9097f97d72487ca531b4244d1ec..fdba9138773f6f6a4f36655f81965e955e79b3bc 100644 (file)
--- a/bisect.h
+++ b/bisect.h
struct commit_list **tried,
int show_all);
-/* show_bisect_vars flags */
+/* 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;
+ int bisect_show_flags;
int show_timestamp;
int hdr_termination;
const char *header_prefix;
};
-extern int show_bisect_vars(struct rev_list_info *info, int reaches, int all,
- int flags);
+extern int show_bisect_vars(struct rev_list_info *info, int reaches, int all);
extern int bisect_next_vars(const char *prefix);
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 244b73eaeb7a985ea8f73acbb99ffe930df9f785..193993cf4494aca98d5e57ce80bc2c99b5cba948 100644 (file)
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
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;
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);
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;
}
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,