#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "copy.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
#include "parse-options.h"
#include "bisect.h"
#include "refs.h"
#include "strvec.h"
#include "run-command.h"
#include "oid-array.h"
#include "path.h"
#include "prompt.h"
#include "quote.h"
#include "revision.h"
static GIT_PATH_FUNC(git_path_bisect_terms, "BISECT_TERMS")
static GIT_PATH_FUNC(git_path_bisect_ancestors_ok, "BISECT_ANCESTORS_OK")
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_names, "BISECT_NAMES")
static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT")
static GIT_PATH_FUNC(git_path_bisect_run, "BISECT_RUN")
#define BUILTIN_GIT_BISECT_START_USAGE …
#define BUILTIN_GIT_BISECT_STATE_USAGE …
#define BUILTIN_GIT_BISECT_TERMS_USAGE …
#define BUILTIN_GIT_BISECT_SKIP_USAGE …
#define BUILTIN_GIT_BISECT_NEXT_USAGE …
#define BUILTIN_GIT_BISECT_RESET_USAGE …
#define BUILTIN_GIT_BISECT_VISUALIZE_USAGE …
#define BUILTIN_GIT_BISECT_REPLAY_USAGE …
#define BUILTIN_GIT_BISECT_LOG_USAGE …
#define BUILTIN_GIT_BISECT_RUN_USAGE …
static const char * const git_bisect_usage[] = …;
struct add_bisect_ref_data { … };
struct bisect_terms { … };
static void free_terms(struct bisect_terms *terms)
{ … }
static void set_terms(struct bisect_terms *terms, const char *bad,
const char *good)
{ … }
static const char vocab_bad[] = …;
static const char vocab_good[] = …;
static int bisect_autostart(struct bisect_terms *terms);
LAST_ARG_MUST_BE_NULL
static int one_of(const char *term, ...)
{ … }
static int is_bisect_success(enum bisect_error res)
{ … }
static int write_in_file(const char *path, const char *mode, const char *format, va_list args)
{ … }
__attribute__((format (printf, 2, 3)))
static int write_to_file(const char *path, const char *format, ...)
{ … }
__attribute__((format (printf, 2, 3)))
static int append_to_file(const char *path, const char *format, ...)
{ … }
static int print_file_to_stdout(const char *path)
{ … }
static int check_term_format(const char *term, const char *orig_term)
{ … }
static int write_terms(const char *bad, const char *good)
{ … }
static int bisect_reset(const char *commit)
{ … }
static void log_commit(FILE *fp,
const char *fmt, const char *state,
struct commit *commit)
{ … }
static int bisect_write(const char *state, const char *rev,
const struct bisect_terms *terms, int nolog)
{ … }
static int check_and_set_terms(struct bisect_terms *terms, const char *cmd)
{ … }
static int inc_nr(const char *refname UNUSED,
const char *referent UNUSED,
const struct object_id *oid UNUSED,
int flag UNUSED, void *cb_data)
{ … }
static const char need_bad_and_good_revision_warning[] = …);
static const char need_bisect_start_warning[] = …);
static int decide_next(const struct bisect_terms *terms,
const char *current_term, int missing_good,
int missing_bad)
{ … }
static void bisect_status(struct bisect_state *state,
const struct bisect_terms *terms)
{ … }
__attribute__((format (printf, 1, 2)))
static void bisect_log_printf(const char *fmt, ...)
{ … }
static void bisect_print_status(const struct bisect_terms *terms)
{ … }
static int bisect_next_check(const struct bisect_terms *terms,
const char *current_term)
{ … }
static int get_terms(struct bisect_terms *terms)
{ … }
static int bisect_terms(struct bisect_terms *terms, const char *option)
{ … }
static int bisect_append_log_quoted(const char **argv)
{ … }
static int add_bisect_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flags UNUSED, void *cb)
{ … }
static int prepare_revs(struct bisect_terms *terms, struct rev_info *revs)
{ … }
static int bisect_skipped_commits(struct bisect_terms *terms)
{ … }
static int bisect_successful(struct bisect_terms *terms)
{ … }
static enum bisect_error bisect_next(struct bisect_terms *terms, const char *prefix)
{ … }
static enum bisect_error bisect_auto_next(struct bisect_terms *terms, const char *prefix)
{ … }
static enum bisect_error bisect_start(struct bisect_terms *terms, int argc,
const char **argv)
{ … }
static inline int file_is_not_empty(const char *path)
{ … }
static int bisect_autostart(struct bisect_terms *terms)
{ … }
static enum bisect_error bisect_state(struct bisect_terms *terms, int argc,
const char **argv)
{ … }
static enum bisect_error bisect_log(void)
{ … }
static int process_replay_line(struct bisect_terms *terms, struct strbuf *line)
{ … }
static enum bisect_error bisect_replay(struct bisect_terms *terms, const char *filename)
{ … }
static enum bisect_error bisect_skip(struct bisect_terms *terms, int argc,
const char **argv)
{ … }
static int bisect_visualize(struct bisect_terms *terms, int argc,
const char **argv)
{ … }
static int get_first_good(const char *refname UNUSED,
const char *referent UNUSED,
const struct object_id *oid,
int flag UNUSED, void *cb_data)
{ … }
static int do_bisect_run(const char *command)
{ … }
static int verify_good(const struct bisect_terms *terms, const char *command)
{ … }
static int bisect_run(struct bisect_terms *terms, int argc, const char **argv)
{ … }
static int cmd_bisect__reset(int argc, const char **argv, const char *prefix UNUSED)
{ … }
static int cmd_bisect__terms(int argc, const char **argv, const char *prefix UNUSED)
{ … }
static int cmd_bisect__start(int argc, const char **argv, const char *prefix UNUSED)
{ … }
static int cmd_bisect__next(int argc, const char **argv UNUSED, const char *prefix)
{ … }
static int cmd_bisect__log(int argc UNUSED, const char **argv UNUSED, const char *prefix UNUSED)
{ … }
static int cmd_bisect__replay(int argc, const char **argv, const char *prefix UNUSED)
{ … }
static int cmd_bisect__skip(int argc, const char **argv, const char *prefix UNUSED)
{ … }
static int cmd_bisect__visualize(int argc, const char **argv, const char *prefix UNUSED)
{ … }
static int cmd_bisect__run(int argc, const char **argv, const char *prefix UNUSED)
{ … }
int cmd_bisect(int argc,
const char **argv,
const char *prefix,
struct repository *repo UNUSED)
{ … }