summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 280e65c)
raw | patch | inline | side by side (parent: 280e65c)
author | Christian Couder <chriscool@tuxfamily.org> | |
Sun, 19 Apr 2009 09:55:57 +0000 (11:55 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 10 May 2009 07:30:28 +0000 (00:30 -0700) |
So we can easily reuse the code in a later patch.
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.c | patch | blob | history |
diff --git a/bisect.c b/bisect.c
index 58f7e6f7738def184072247f934cce06d349c91d..0448eae3f8ffb80fd383db83507a9a4e7fdbe412 100644 (file)
--- a/bisect.c
+++ b/bisect.c
revs->limited = 1;
}
+static void bisect_common(struct rev_info *revs, const char *prefix,
+ int *reaches, int *all)
+{
+ bisect_rev_setup(revs, prefix);
+
+ if (prepare_revision_walk(revs))
+ die("revision walk setup failed");
+ if (revs->tree_objects)
+ mark_edges_uninteresting(revs->commits, revs, NULL);
+
+ revs->commits = find_bisection(revs->commits, reaches, all,
+ !!skipped_sha1_nr);
+}
+
int bisect_next_vars(const char *prefix)
{
struct rev_info revs;
info.revs = &revs;
info.bisect_show_flags = BISECT_SHOW_TRIED | BISECT_SHOW_STRINGED;
- bisect_rev_setup(&revs, prefix);
-
- if (prepare_revision_walk(&revs))
- die("revision walk setup failed");
- if (revs.tree_objects)
- mark_edges_uninteresting(revs.commits, &revs, NULL);
-
- revs.commits = find_bisection(revs.commits, &reaches, &all,
- !!skipped_sha1_nr);
+ bisect_common(&revs, prefix, &reaches, &all);
return show_bisect_vars(&info, reaches, all);
}