git/builtin/rev-parse.c

/*
 * rev-parse.c
 *
 * Copyright (C) Linus Torvalds, 2005
 */
#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"

#include "abspath.h"
#include "config.h"
#include "commit.h"
#include "environment.h"
#include "gettext.h"
#include "hash.h"
#include "hex.h"
#include "refs.h"
#include "quote.h"
#include "object-name.h"
#include "parse-options.h"
#include "path.h"
#include "diff.h"
#include "read-cache-ll.h"
#include "repo-settings.h"
#include "repository.h"
#include "revision.h"
#include "setup.h"
#include "split-index.h"
#include "submodule.h"
#include "commit-reach.h"
#include "shallow.h"
#include "object-file-convert.h"

#define DO_REVS
#define DO_NOREV
#define DO_FLAGS
#define DO_NONFLAGS
static int filter =;

static const char *def;

#define NORMAL
#define REVERSED
static int show_type =;

#define SHOW_SYMBOLIC_ASIS
#define SHOW_SYMBOLIC_FULL
static int symbolic;
static int abbrev;
static int abbrev_ref;
static int abbrev_ref_strict;
static int output_sq;

static int stuck_long;
static struct ref_exclusions ref_excludes =;

/*
 * Some arguments are relevant "revision" arguments,
 * others are about output format or other details.
 * This sorts it all out.
 */
static int is_rev_argument(const char *arg)
{}

/* Output argument as a string, either SQ or normal */
static void show(const char *arg)
{}

/* Like show(), but with a negation prefix according to type */
static void show_with_type(int type, const char *arg)
{}

/* Output a revision, only if filter allows it */
static void show_rev(int type, const struct object_id *oid, const char *name)
{}

/* Output a flag, only if filter allows it. */
static int show_flag(const char *arg)
{}

static int show_default(void)
{}

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

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

static int show_abbrev(const struct object_id *oid, void *cb_data UNUSED)
{}

static void show_datestring(const char *flag, const char *datestr)
{}

static int show_file(const char *arg, int output_prefix)
{}

static int try_difference(const char *arg)
{}

static int try_parent_shorthands(const char *arg)
{}

static int parseopt_dump(const struct option *o, const char *arg, int unset)
{}

static const char *skipspaces(const char *s)
{}

static char *findspace(const char *s)
{}

static int cmd_parseopt(int argc, const char **argv, const char *prefix)
{}

static int cmd_sq_quote(int argc, const char **argv)
{}

static void die_no_single_rev(int quiet)
{}

static const char builtin_rev_parse_usage[] =);

/*
 * Parse "opt" or "opt=<value>", setting value respectively to either
 * NULL or the string after "=".
 */
static int opt_with_value(const char *arg, const char *opt, const char **value)
{}

static void handle_ref_opt(const char *pattern, const char *prefix)
{}

enum format_type {};

enum default_type {};

static void print_path(const char *path, const char *prefix, enum format_type format, enum default_type def)
{}

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