#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hash.h"
#include "hex.h"
#include "pretty.h"
#include "refs.h"
#include "color.h"
#include "strvec.h"
#include "object-name.h"
#include "parse-options.h"
#include "dir.h"
#include "commit-slab.h"
#include "date.h"
#include "wildmatch.h"
static const char* show_branch_usage[] = …;
static int showbranch_use_color = …;
static struct strvec default_args = …;
#define UNINTERESTING …
#define REV_SHIFT …
#define MAX_REVS …
#define DEFAULT_REFLOG …
static const char *get_color_code(int idx)
{ … }
static const char *get_color_reset_code(void)
{ … }
static struct commit *interesting(struct commit_list *list)
{ … }
struct commit_name { … };
define_commit_slab(commit_name_slab, struct commit_name *);
static struct commit_name_slab name_slab;
static struct commit_name *commit_to_name(struct commit *commit)
{ … }
static void name_commit(struct commit *commit, const char *head_name, int nth)
{ … }
static void name_parent(struct commit *commit, struct commit *parent)
{ … }
static int name_first_parent_chain(struct commit *c)
{ … }
static void name_commits(struct commit_list *list,
struct commit **rev,
char **ref_name,
int num_rev)
{ … }
static int mark_seen(struct commit *commit, struct commit_list **seen_p)
{ … }
static void join_revs(struct commit_list **list_p,
struct commit_list **seen_p,
int num_rev, int extra)
{ … }
static void show_one_commit(struct commit *commit, int no_name)
{ … }
static char *ref_name[MAX_REVS + 1];
static int ref_name_cnt;
static const char *find_digit_prefix(const char *s, int *v)
{ … }
static int version_cmp(const char *a, const char *b)
{ … }
static int compare_ref_name(const void *a_, const void *b_)
{ … }
static void sort_ref_range(int bottom, int top)
{ … }
static int append_ref(const char *refname, const struct object_id *oid,
int allow_dups)
{ … }
static int append_head_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *cb_data UNUSED)
{ … }
static int append_remote_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *cb_data UNUSED)
{ … }
static int append_tag_ref(const char *refname, const struct object_id *oid,
int flag UNUSED, void *cb_data UNUSED)
{ … }
static const char *match_ref_pattern = …;
static int match_ref_slash = …;
static int append_matching_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flag, void *cb_data)
{ … }
static void snarf_refs(int head, int remotes)
{ … }
static int rev_is_head(const char *head, const char *name)
{ … }
static int show_merge_base(const struct commit_list *seen, int num_rev)
{ … }
static int show_independent(struct commit **rev,
int num_rev,
unsigned int *rev_mask)
{ … }
static void append_one_rev(const char *av)
{ … }
static int git_show_branch_config(const char *var, const char *value,
const struct config_context *ctx, void *cb)
{ … }
static int omit_in_dense(struct commit *commit, struct commit **rev, int n)
{ … }
static int reflog = …;
static int parse_reflog_param(const struct option *opt, const char *arg,
int unset)
{ … }
int cmd_show_branch(int ac,
const char **av,
const char *prefix,
struct repository *repo UNUSED)
{ … }