summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-03-26 04:55:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-03-30 08:22:54 (GMT)
commit7428d754e2dec9e82253d1e02b4df20fab3f3384 (patch)
tree2ebb2e14b34e6e0df883def007b47618bc334399
parent6a17fad73369173ca71d3adf0d4335a0c8137cb9 (diff)
downloadgit-7428d754e2dec9e82253d1e02b4df20fab3f3384.zip
git-7428d754e2dec9e82253d1e02b4df20fab3f3384.tar.gz
git-7428d754e2dec9e82253d1e02b4df20fab3f3384.tar.bz2
rev-list: pass "revs" to "show_bisect_vars"
instead of using static "revs" data Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--bisect.h3
-rw-r--r--builtin-rev-list.c13
2 files changed, 9 insertions, 7 deletions
diff --git a/bisect.h b/bisect.h
index 860a15c..31c99fe 100644
--- a/bisect.h
+++ b/bisect.h
@@ -5,6 +5,7 @@ extern struct commit_list *find_bisection(struct commit_list *list,
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 c700c34..cdb0f9d 100644
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
@@ -226,16 +226,16 @@ static int estimate_bisect_steps(int all)
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
@@ -247,10 +247,10 @@ int show_bisect_vars(int reaches, int all, int show_all)
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");
}
@@ -358,7 +358,8 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
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,