summaryrefslogtreecommitdiff
path: root/bisect.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-04-06 20:28:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-04-08 05:12:41 (GMT)
commitd797257eb280b67dd1f7153a66b03453c0fb927a (patch)
treeebb76167611556b8f96f2363440a6793907d9bb2 /bisect.c
parent11c211fa06fc396e8ee8132ef83e2f2763ff6976 (diff)
downloadgit-d797257eb280b67dd1f7153a66b03453c0fb927a.zip
git-d797257eb280b67dd1f7153a66b03453c0fb927a.tar.gz
git-d797257eb280b67dd1f7153a66b03453c0fb927a.tar.bz2
rev-list: remove last static vars used in "show_commit"
This patch removes the last static variables that were used in the "show_commit" function. To do that, we create a new "rev_list_info" struct that we will pass in the "void *data" argument to "show_commit". This means that we have to change the first argument to "show_bisect_vars" too. While at it, we also remove a "struct commit_list *list" variable in "cmd_rev_list" that is not really needed. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bisect.c')
-rw-r--r--bisect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bisect.c b/bisect.c
index 69f8860..4d2a150 100644
--- a/bisect.c
+++ b/bisect.c
@@ -535,8 +535,12 @@ static void bisect_rev_setup(struct rev_info *revs, const char *prefix)
int bisect_next_vars(const char *prefix)
{
struct rev_info revs;
+ struct rev_list_info info;
int reaches = 0, all = 0;
+ memset(&info, 0, sizeof(info));
+ info.revs = &revs;
+
bisect_rev_setup(&revs, prefix);
if (prepare_revision_walk(&revs))
@@ -547,6 +551,6 @@ int bisect_next_vars(const char *prefix)
revs.commits = find_bisection(revs.commits, &reaches, &all,
!!skipped_sha1_nr);
- return show_bisect_vars(&revs, reaches, all,
+ return show_bisect_vars(&info, reaches, all,
BISECT_SHOW_TRIED | BISECT_SHOW_STRINGED);
}