#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
#include "editor.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "parse-options.h"
#include "path.h"
#include "run-command.h"
#include "object-file.h"
#include "object-name.h"
#include "object-store-ll.h"
#include "replace-object.h"
#include "tag.h"
#include "wildmatch.h"
static const char * const git_replace_usage[] = …;
enum replace_format { … };
struct show_data { … };
static int show_reference(const char *refname,
const char *referent UNUSED,
const struct object_id *oid,
int flag UNUSED, void *cb_data)
{ … }
static int list_replace_refs(const char *pattern, const char *format)
{ … }
each_replace_name_fn;
static int for_each_replace_name(const char **argv, each_replace_name_fn fn)
{ … }
static int delete_replace_ref(const char *name, const char *ref,
const struct object_id *oid)
{ … }
static int check_ref_valid(struct object_id *object,
struct object_id *prev,
struct strbuf *ref,
int force)
{ … }
static int replace_object_oid(const char *object_ref,
struct object_id *object,
const char *replace_ref,
struct object_id *repl,
int force)
{ … }
static int replace_object(const char *object_ref, const char *replace_ref, int force)
{ … }
static int export_object(const struct object_id *oid, enum object_type type,
int raw, const char *filename)
{ … }
static int import_object(struct object_id *oid, enum object_type type,
int raw, const char *filename)
{ … }
static int edit_and_replace(const char *object_ref, int force, int raw)
{ … }
static int replace_parents(struct strbuf *buf, int argc, const char **argv)
{ … }
struct check_mergetag_data { … };
static int check_one_mergetag(struct commit *commit UNUSED,
struct commit_extra_header *extra,
void *data)
{ … }
static int check_mergetags(struct commit *commit, int argc, const char **argv)
{ … }
static int create_graft(int argc, const char **argv, int force, int gentle)
{ … }
static int convert_graft_file(int force)
{ … }
int cmd_replace(int argc,
const char **argv,
const char *prefix,
struct repository *repo UNUSED)
{ … }