#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "advice.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hash.h"
#include "hex.h"
#include "lockfile.h"
#include "object.h"
#include "pretty.h"
#include "refs.h"
#include "diff.h"
#include "diffcore.h"
#include "tree.h"
#include "branch.h"
#include "object-name.h"
#include "parse-options.h"
#include "path.h"
#include "repository.h"
#include "unpack-trees.h"
#include "cache-tree.h"
#include "setup.h"
#include "sparse-index.h"
#include "submodule.h"
#include "trace.h"
#include "trace2.h"
#include "dir.h"
#include "add-interactive.h"
#define REFRESH_INDEX_DELAY_WARNING_IN_MS …
static const char * const git_reset_usage[] = …;
enum reset_type { … };
static const char *reset_type_names[] = …;
static inline int is_merge(void)
{ … }
static int reset_index(const char *ref, const struct object_id *oid, int reset_type, int quiet)
{ … }
static void print_new_head_line(struct commit *commit)
{ … }
static void update_index_from_diff(struct diff_queue_struct *q,
struct diff_options *opt UNUSED,
void *data)
{ … }
static int read_from_tree(const struct pathspec *pathspec,
struct object_id *tree_oid,
int intent_to_add)
{ … }
static void set_reflog_message(struct strbuf *sb, const char *action,
const char *rev)
{ … }
static void die_if_unmerged_cache(int reset_type)
{ … }
static void parse_args(struct pathspec *pathspec,
const char **argv, const char *prefix,
int patch_mode,
const char **rev_ret)
{ … }
static int reset_refs(const char *rev, const struct object_id *oid)
{ … }
static int git_reset_config(const char *var, const char *value,
const struct config_context *ctx, void *cb)
{ … }
int cmd_reset(int argc,
const char **argv,
const char *prefix,
struct repository *repo UNUSED)
{ … }