#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "advice.h"
#include "config.h"
#include "branch.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "object-name.h"
#include "path.h"
#include "refs.h"
#include "refspec.h"
#include "remote.h"
#include "repository.h"
#include "sequencer.h"
#include "commit.h"
#include "worktree.h"
#include "submodule-config.h"
#include "run-command.h"
#include "strmap.h"
struct tracking { … };
struct find_tracked_branch_cb { … };
static int find_tracked_branch(struct remote *remote, void *priv)
{ … }
static int should_setup_rebase(const char *origin)
{ … }
static int install_branch_config_multiple_remotes(int flag, const char *local,
const char *origin, struct string_list *remotes)
{ … }
int install_branch_config(int flag, const char *local, const char *origin,
const char *remote)
{ … }
static int inherit_tracking(struct tracking *tracking, const char *orig_ref)
{ … }
static void setup_tracking(const char *new_ref, const char *orig_ref,
enum branch_track track, int quiet)
{ … }
int read_branch_desc(struct strbuf *buf, const char *branch_name)
{ … }
int validate_branchname(const char *name, struct strbuf *ref)
{ … }
static int initialized_checked_out_branches;
static struct strmap current_checked_out_branches = …;
static void prepare_checked_out_branches(void)
{ … }
const char *branch_checked_out(const char *refname)
{ … }
int validate_new_branchname(const char *name, struct strbuf *ref, int force)
{ … }
static int check_tracking_branch(struct remote *remote, void *cb_data)
{ … }
static int validate_remote_tracking_branch(char *ref)
{ … }
static const char upstream_not_branch[] = …);
static const char upstream_missing[] = …);
static const char upstream_advice[] = …);
static void dwim_branch_start(struct repository *r, const char *start_name,
enum branch_track track, char **out_real_ref,
struct object_id *out_oid)
{ … }
void create_branch(struct repository *r,
const char *name, const char *start_name,
int force, int clobber_head_ok, int reflog,
int quiet, enum branch_track track, int dry_run)
{ … }
void dwim_and_setup_tracking(struct repository *r, const char *new_ref,
const char *orig_ref, enum branch_track track,
int quiet)
{ … }
static int submodule_create_branch(struct repository *r,
const struct submodule *submodule,
const char *name, const char *start_oid,
const char *tracking_name, int force,
int reflog, int quiet,
enum branch_track track, int dry_run)
{ … }
void create_branches_recursively(struct repository *r, const char *name,
const char *start_committish,
const char *tracking_name, int force,
int reflog, int quiet, enum branch_track track,
int dry_run)
{ … }
void remove_merge_branch_state(struct repository *r)
{ … }
void remove_branch_state(struct repository *r, int verbose)
{ … }
void die_if_checked_out(const char *branch, int ignore_current_worktree)
{ … }