git/builtin/describe.c

#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
#include "commit.h"
#include "tag.h"
#include "refs.h"
#include "object-name.h"
#include "parse-options.h"
#include "read-cache-ll.h"
#include "revision.h"
#include "diff.h"
#include "hashmap.h"
#include "setup.h"
#include "strvec.h"
#include "run-command.h"
#include "object-store-ll.h"
#include "list-objects.h"
#include "commit-slab.h"
#include "wildmatch.h"

#define MAX_TAGS
#define DEFAULT_CANDIDATES

define_commit_slab(commit_names, struct commit_name *);

static const char * const describe_usage[] =;

static int debug;	/* Display lots of verbose info */
static int all;	/* Any valid ref can be used */
static int tags;	/* Allow lightweight tags */
static int longformat;
static int first_parent;
static int abbrev =; /* unspecified */
static int max_candidates =;
static struct hashmap names;
static int have_util;
static struct string_list patterns =;
static struct string_list exclude_patterns =;
static int always;
static const char *suffix, *dirty, *broken;
static struct commit_names commit_names;

/* diff-index command arguments to check if working tree is dirty. */
static const char *diff_index_args[] =;

static const char *update_index_args[] =;

struct commit_name {};

static const char *prio_names[] =;

static int commit_name_neq(const void *cmp_data UNUSED,
			   const struct hashmap_entry *eptr,
			   const struct hashmap_entry *entry_or_key,
			   const void *peeled)
{}

static inline struct commit_name *find_commit_name(const struct object_id *peeled)
{}

static int replace_name(struct commit_name *e,
			       int prio,
			       const struct object_id *oid,
			       struct tag **tag)
{}

static void add_to_known_names(const char *path,
			       const struct object_id *peeled,
			       int prio,
			       const struct object_id *oid)
{}

static int get_name(const char *path, const char *referent UNUSED, const struct object_id *oid,
		    int flag UNUSED, void *cb_data UNUSED)
{}

struct possible_tag {};

static int compare_pt(const void *a_, const void *b_)
{}

static unsigned long finish_depth_computation(
	struct commit_list **list,
	struct possible_tag *best)
{}

static void append_name(struct commit_name *n, struct strbuf *dst)
{}

static void append_suffix(int depth, const struct object_id *oid, struct strbuf *dst)
{}

static void describe_commit(struct object_id *oid, struct strbuf *dst)
{}

struct process_commit_data {};

static void process_commit(struct commit *commit, void *data)
{}

static void process_object(struct object *obj, const char *path, void *data)
{}

static void describe_blob(struct object_id oid, struct strbuf *dst)
{}

static void describe(const char *arg, int last_one)
{}

static int option_parse_exact_match(const struct option *opt, const char *arg,
				    int unset)
{}

int cmd_describe(int argc,
		 const char **argv,
		 const char *prefix,
		 struct repository *repo UNUSED )
{}