blob: 821d16e4ddad71d177190a0e05012c5a509fa17b [file] [log] [blame]
Christian Coudera2ad79c2009-03-26 05:55:24 +01001#ifndef BISECT_H
2#define BISECT_H
3
Elijah Newrenef3ca952018-08-15 10:54:05 -07004struct commit_list;
Nguyễn Thái Ngọc Duy69d2cfe2018-11-10 06:48:59 +01005struct repository;
Elijah Newrenef3ca952018-08-15 10:54:05 -07006
Martin Ågren24d707f2017-11-05 21:24:28 +01007/*
8 * Find bisection. If something is found, `reaches` will be the number of
9 * commits that the best commit reaches. `all` will be the count of
10 * non-SAMETREE commits. If nothing is found, `list` will be NULL.
11 * Otherwise, it will be either all non-SAMETREE commits or the single
12 * best commit, as chosen by `find_all`.
13 */
14extern void find_bisection(struct commit_list **list, int *reaches, int *all,
15 int find_all);
Christian Coudera2ad79c2009-03-26 05:55:24 +010016
Christian Couder95188642009-03-26 05:55:49 +010017extern struct commit_list *filter_skipped(struct commit_list *list,
18 struct commit_list **tried,
Christian Couder9af35892009-06-06 06:41:33 +020019 int show_all,
20 int *count,
21 int *skipped_first);
Christian Couder95188642009-03-26 05:55:49 +010022
Christian Couder37c4c382009-03-29 11:55:43 +020023#define BISECT_SHOW_ALL (1<<0)
Nguyễn Thái Ngọc Duy98993722012-02-28 21:00:00 +070024#define REV_LIST_QUIET (1<<1)
Christian Couder37c4c382009-03-29 11:55:43 +020025
Christian Couderd7972572009-04-06 22:28:00 +020026struct rev_list_info {
27 struct rev_info *revs;
Nguyễn Thái Ngọc Duy98993722012-02-28 21:00:00 +070028 int flags;
Christian Couderd7972572009-04-06 22:28:00 +020029 int show_timestamp;
30 int hdr_termination;
31 const char *header_prefix;
32};
33
Nguyễn Thái Ngọc Duy69d2cfe2018-11-10 06:48:59 +010034extern int bisect_next_all(struct repository *r,
35 const char *prefix,
36 int no_checkout);
Christian Couder1bf072e2009-03-26 05:55:54 +010037
Christian Couder1c876542009-04-19 11:55:38 +020038extern int estimate_bisect_steps(int all);
39
Antoine Delaitecb46d632015-06-29 17:40:30 +020040extern void read_bisect_terms(const char **bad, const char **good);
41
Pranit Bauvafb71a322017-09-29 06:49:39 +000042extern int bisect_clean_state(void);
43
Christian Coudera2ad79c2009-03-26 05:55:24 +010044#endif