#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "config.h"
#include "commit.h"
#include "diff.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "revision.h"
#include "refs.h"
#include "list-objects.h"
#include "quote.h"
#include "run-command.h"
#include "log-tree.h"
#include "bisect.h"
#include "oid-array.h"
#include "strvec.h"
#include "commit-slab.h"
#include "commit-reach.h"
#include "object-name.h"
#include "object-store-ll.h"
#include "path.h"
#include "dir.h"
static struct oid_array good_revs;
static struct oid_array skipped_revs;
static struct object_id *current_bad_oid;
static const char *term_bad;
static const char *term_good;
#define COUNTED …
static int count_distance(struct commit_list *entry)
{ … }
static void clear_distance(struct commit_list *list)
{ … }
define_commit_slab(commit_weight, int *);
static struct commit_weight commit_weight;
#define DEBUG_BISECT …
static inline int weight(struct commit_list *elem)
{ … }
static inline void weight_set(struct commit_list *elem, int weight)
{ … }
static int count_interesting_parents(struct commit *commit, unsigned bisect_flags)
{ … }
static inline int approx_halfway(struct commit_list *p, int nr)
{ … }
static void show_list(const char *debug, int counted, int nr,
struct commit_list *list)
{ … }
static struct commit_list *best_bisection(struct commit_list *list, int nr)
{ … }
struct commit_dist { … };
static int compare_commit_dist(const void *a_, const void *b_)
{ … }
static struct commit_list *best_bisection_sorted(struct commit_list *list, int nr)
{ … }
static struct commit_list *do_find_bisection(struct commit_list *list,
int nr, int *weights,
unsigned bisect_flags)
{ … }
void find_bisection(struct commit_list **commit_list, int *reaches,
int *all, unsigned bisect_flags)
{ … }
static int register_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flags UNUSED, void *cb_data UNUSED)
{ … }
static int read_bisect_refs(void)
{ … }
static GIT_PATH_FUNC(git_path_bisect_names, "BISECT_NAMES")
static GIT_PATH_FUNC(git_path_bisect_ancestors_ok, "BISECT_ANCESTORS_OK")
static GIT_PATH_FUNC(git_path_bisect_run, "BISECT_RUN")
static GIT_PATH_FUNC(git_path_bisect_start, "BISECT_START")
static GIT_PATH_FUNC(git_path_bisect_log, "BISECT_LOG")
static GIT_PATH_FUNC(git_path_bisect_terms, "BISECT_TERMS")
static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT")
static void read_bisect_paths(struct strvec *array)
{ … }
static char *join_oid_array_hex(struct oid_array *array, char delim)
{ … }
struct commit_list *filter_skipped(struct commit_list *list,
struct commit_list **tried,
int show_all,
int *count,
int *skipped_first)
{ … }
#define PRN_MODULO …
static unsigned get_prn(unsigned count)
{ … }
static int sqrti(int val)
{ … }
static struct commit_list *skip_away(struct commit_list *list, int count)
{ … }
static struct commit_list *managed_skipped(struct commit_list *list,
struct commit_list **tried)
{ … }
static void bisect_rev_setup(struct repository *r, struct rev_info *revs,
struct strvec *rev_argv,
const char *prefix,
const char *bad_format, const char *good_format,
int read_paths)
{ … }
static void bisect_common(struct rev_info *revs)
{ … }
static enum bisect_error error_if_skipped_commits(struct commit_list *tried,
const struct object_id *bad)
{ … }
static int is_expected_rev(const struct object_id *oid)
{ … }
enum bisect_error bisect_checkout(const struct object_id *bisect_rev,
int no_checkout)
{ … }
static struct commit *get_commit_reference(struct repository *r,
const struct object_id *oid)
{ … }
static struct commit **get_bad_and_good_commits(struct repository *r,
int *rev_nr)
{ … }
static enum bisect_error handle_bad_merge_base(void)
{ … }
static void handle_skipped_merge_base(const struct object_id *mb)
{ … }
static enum bisect_error check_merge_bases(int rev_nr, struct commit **rev, int no_checkout)
{ … }
static int check_ancestors(struct repository *r, int rev_nr,
struct commit **rev, const char *prefix)
{ … }
static enum bisect_error check_good_are_ancestors_of_bad(struct repository *r,
const char *prefix,
int no_checkout)
{ … }
static void show_commit(struct commit *commit)
{ … }
void read_bisect_terms(const char **read_bad, const char **read_good)
{ … }
enum bisect_error bisect_next_all(struct repository *r, const char *prefix)
{ … }
static inline int exp2i(int n)
{ … }
int estimate_bisect_steps(int all)
{ … }
static int mark_for_removal(const char *refname,
const char *referent UNUSED,
const struct object_id *oid UNUSED,
int flag UNUSED, void *cb_data)
{ … }
int bisect_clean_state(void)
{ … }