#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
#include "color.h"
#include "editor.h"
#include "environment.h"
#include "refs.h"
#include "commit.h"
#include "gettext.h"
#include "object-name.h"
#include "remote.h"
#include "parse-options.h"
#include "branch.h"
#include "path.h"
#include "string-list.h"
#include "column.h"
#include "utf8.h"
#include "ref-filter.h"
#include "worktree.h"
#include "help.h"
#include "advice.h"
#include "commit-reach.h"
static const char * const builtin_branch_usage[] = …;
static const char *head;
static struct object_id head_oid;
static int recurse_submodules = …;
static int submodule_propagate_branches = …;
static int branch_use_color = …;
static char branch_colors[][COLOR_MAXLEN] = …;
enum color_branch { … };
static const char *color_branch_slots[] = …;
static struct string_list output = …;
static unsigned int colopts;
define_list_config_array(…) …;
static int git_branch_config(const char *var, const char *value,
const struct config_context *ctx, void *cb)
{ … }
static const char *branch_get_color(enum color_branch ix)
{ … }
static int branch_merged(int kind, const char *name,
struct commit *rev, struct commit *head_rev)
{ … }
static int check_branch_commit(const char *branchname, const char *refname,
const struct object_id *oid, struct commit *head_rev,
int kinds, int force)
{ … }
static void delete_branch_config(const char *branchname)
{ … }
static int delete_branches(int argc, const char **argv, int force, int kinds,
int quiet)
{ … }
static int calc_maxwidth(struct ref_array *refs, int remote_bonus)
{ … }
static const char *quote_literal_for_format(const char *s)
{ … }
static char *build_format(struct ref_filter *filter, int maxwidth, const char *remote_prefix)
{ … }
static void print_ref_list(struct ref_filter *filter, struct ref_sorting *sorting,
struct ref_format *format, struct string_list *output)
{ … }
static void print_current_branch_name(void)
{ … }
static void reject_rebase_or_bisect_branch(struct worktree **worktrees,
const char *target)
{ … }
static int replace_each_worktree_head_symref(struct worktree **worktrees,
const char *oldref, const char *newref,
const char *logmsg)
{ … }
#define IS_HEAD …
#define IS_ORPHAN …
static void copy_or_rename_branch(const char *oldname, const char *newname, int copy, int force)
{ … }
static GIT_PATH_FUNC(edit_description, "EDIT_DESCRIPTION")
static int edit_branch_description(const char *branch_name)
{ … }
int cmd_branch(int argc,
const char **argv,
const char *prefix,
struct repository *repo UNUSED)
{ … }