summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6a17fad)
raw | patch | inline | side by side (parent: 6a17fad)
author | Christian Couder <chriscool@tuxfamily.org> | |
Thu, 26 Mar 2009 04:55:41 +0000 (05:55 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 30 Mar 2009 08:22:54 +0000 (01:22 -0700) |
instead of using static "revs" data
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bisect.h | patch | blob | history | |
builtin-rev-list.c | patch | blob | history |
diff --git a/bisect.h b/bisect.h
index 860a15c9b8de4b82ff5979d7d4afbba922c60732..31c99fe5f4deceb657b50d1fb1f446568c208400 100644 (file)
--- a/bisect.h
+++ b/bisect.h
int *reaches, int *all,
int find_all);
-extern int show_bisect_vars(int reaches, int all, int show_all);
+extern int show_bisect_vars(struct rev_info *revs, int reaches, int all,
+ int show_all);
#endif
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index c700c34be58e1368f19d00fe811f864517d6acf1..cdb0f9d913b8334bde8f4aebee7c88a8d378c239 100644 (file)
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
return (e < 3 * x) ? n : n - 1;
}
-int show_bisect_vars(int reaches, int all, int show_all)
+int show_bisect_vars(struct rev_info *revs, int reaches, int all, int show_all)
{
int cnt;
char hex[41];
- if (!revs.commits)
+ if (!revs->commits)
return 1;
/*
- * revs.commits can reach "reaches" commits among
+ * revs->commits can reach "reaches" commits among
* "all" commits. If it is good, then there are
* (all-reaches) commits left to be bisected.
* On the other hand, if it is bad, then the set
if (cnt < reaches)
cnt = reaches;
- strcpy(hex, sha1_to_hex(revs.commits->item->object.sha1));
+ strcpy(hex, sha1_to_hex(revs->commits->item->object.sha1));
if (show_all) {
- traverse_commit_list(&revs, show_commit, show_object);
+ traverse_commit_list(revs, show_commit, show_object);
printf("------\n");
}
revs.commits = find_bisection(revs.commits, &reaches, &all,
bisect_find_all);
if (bisect_show_vars)
- return show_bisect_vars(reaches, all, bisect_find_all);
+ return show_bisect_vars(&revs, reaches, all,
+ bisect_find_all);
}
traverse_commit_list(&revs,