#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
#include "gettext.h"
#include "hash.h"
#include "refs.h"
#include "object-name.h"
#include "parse-options.h"
#include "quote.h"
static const char * const git_update_ref_usage[] = …;
static char line_termination = …;
static unsigned int update_flags;
static unsigned int default_flags;
static unsigned create_reflog_flag;
static const char *msg;
static const char *parse_arg(const char *next, struct strbuf *arg)
{ … }
static char *parse_refname(const char **next)
{ … }
static char *parse_next_refname(const char **next)
{ … }
static char *parse_next_arg(const char **next)
{ … }
#define PARSE_SHA1_OLD …
#define PARSE_SHA1_ALLOW_EMPTY …
static int parse_next_oid(const char **next, const char *end,
struct object_id *oid,
const char *command, const char *refname,
int flags)
{ … }
static void parse_cmd_update(struct ref_transaction *transaction,
const char *next, const char *end)
{ … }
static void parse_cmd_symref_update(struct ref_transaction *transaction,
const char *next, const char *end UNUSED)
{ … }
static void parse_cmd_create(struct ref_transaction *transaction,
const char *next, const char *end)
{ … }
static void parse_cmd_symref_create(struct ref_transaction *transaction,
const char *next, const char *end UNUSED)
{ … }
static void parse_cmd_delete(struct ref_transaction *transaction,
const char *next, const char *end)
{ … }
static void parse_cmd_symref_delete(struct ref_transaction *transaction,
const char *next, const char *end UNUSED)
{ … }
static void parse_cmd_verify(struct ref_transaction *transaction,
const char *next, const char *end)
{ … }
static void parse_cmd_symref_verify(struct ref_transaction *transaction,
const char *next, const char *end UNUSED)
{ … }
static void report_ok(const char *command)
{ … }
static void parse_cmd_option(struct ref_transaction *transaction UNUSED,
const char *next, const char *end UNUSED)
{ … }
static void parse_cmd_start(struct ref_transaction *transaction UNUSED,
const char *next, const char *end UNUSED)
{ … }
static void parse_cmd_prepare(struct ref_transaction *transaction,
const char *next, const char *end UNUSED)
{ … }
static void parse_cmd_abort(struct ref_transaction *transaction,
const char *next, const char *end UNUSED)
{ … }
static void parse_cmd_commit(struct ref_transaction *transaction,
const char *next, const char *end UNUSED)
{ … }
enum update_refs_state { … };
static const struct parse_cmd { … } command[] = …;
static void update_refs_stdin(void)
{ … }
int cmd_update_ref(int argc,
const char **argv,
const char *prefix,
struct repository *repo UNUSED)
{ … }