]> git.ipfire.org Git - thirdparty/git.git/blame - bisect.h
bisect: libify `exit_if_skipped_commits` to `error_if_skipped*` and its dependents
[thirdparty/git.git] / bisect.h
CommitLineData
a2ad79ce
CC
1#ifndef BISECT_H
2#define BISECT_H
ef3ca954
EN
3
4struct commit_list;
69d2cfe6 5struct repository;
a2ad79ce 6
24d707f6
7/*
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 */
55454427 14void find_bisection(struct commit_list **list, int *reaches, int *all,
ad6dad09 15 int find_all);
a2ad79ce 16
55454427 17struct commit_list *filter_skipped(struct commit_list *list,
ad6dad09
DL
18 struct commit_list **tried,
19 int show_all,
20 int *count,
21 int *skipped_first);
95188648 22
37c4c38d 23#define BISECT_SHOW_ALL (1<<0)
98993722 24#define REV_LIST_QUIET (1<<1)
37c4c38d 25
d797257e
CC
26struct rev_list_info {
27 struct rev_info *revs;
98993722 28 int flags;
d797257e
CC
29 int show_timestamp;
30 int hdr_termination;
31 const char *header_prefix;
32};
33
680e8a01
MR
34/*
35 * enum bisect_error represents the following return codes:
36 * BISECT_OK: success code. Internally, it means that next
37 * commit has been found (and possibly checked out) and it
38 * should be tested.
39 * BISECT_FAILED error code: default error code.
ce58b5d8
PB
40 * BISECT_ONLY_SKIPPED_LEFT error code: only skipped
41 * commits left to be tested.
680e8a01
MR
42 */
43enum bisect_error {
44 BISECT_OK = 0,
ce58b5d8
PB
45 BISECT_FAILED = -1,
46 BISECT_ONLY_SKIPPED_LEFT = -2
680e8a01
MR
47};
48
49enum bisect_error bisect_next_all(struct repository *r,
ad6dad09
DL
50 const char *prefix,
51 int no_checkout);
1bf072e3 52
55454427 53int estimate_bisect_steps(int all);
1c876546 54
55454427 55void read_bisect_terms(const char **bad, const char **good);
cb46d630 56
55454427 57int bisect_clean_state(void);
fb71a329 58
a2ad79ce 59#endif