rev-list: make "show_bisect_vars" non static
and declare it in "bisect.h" as we will use this function later. While at it, rename its last argument "show_all" instead of "bisect_find_all". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
9996983c9c
commit
6a17fad733
2
bisect.h
2
bisect.h
@ -5,4 +5,6 @@ extern struct commit_list *find_bisection(struct commit_list *list,
|
|||||||
int *reaches, int *all,
|
int *reaches, int *all,
|
||||||
int find_all);
|
int find_all);
|
||||||
|
|
||||||
|
extern int show_bisect_vars(int reaches, int all, int show_all);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -226,7 +226,7 @@ static int estimate_bisect_steps(int all)
|
|||||||
return (e < 3 * x) ? n : n - 1;
|
return (e < 3 * x) ? n : n - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int show_bisect_vars(int reaches, int all, int bisect_find_all)
|
int show_bisect_vars(int reaches, int all, int show_all)
|
||||||
{
|
{
|
||||||
int cnt;
|
int cnt;
|
||||||
char hex[41];
|
char hex[41];
|
||||||
@ -246,9 +246,10 @@ static int show_bisect_vars(int reaches, int all, int bisect_find_all)
|
|||||||
cnt = all - reaches;
|
cnt = all - reaches;
|
||||||
if (cnt < reaches)
|
if (cnt < reaches)
|
||||||
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 (bisect_find_all) {
|
if (show_all) {
|
||||||
traverse_commit_list(&revs, show_commit, show_object);
|
traverse_commit_list(&revs, show_commit, show_object);
|
||||||
printf("------\n");
|
printf("------\n");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user