summaryrefslogtreecommitdiffstats
path: root/builtin/update-ref.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/update-ref.c')
-rw-r--r--builtin/update-ref.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index 6a6a2ff55d..8a98615dc8 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -1,3 +1,4 @@
+#define USE_THE_REPOSITORY_VARIABLE
#include "builtin.h"
#include "config.h"
#include "gettext.h"
@@ -6,7 +7,6 @@
#include "object-name.h"
#include "parse-options.h"
#include "quote.h"
-#include "repository.h"
static const char * const git_update_ref_usage[] = {
N_("git update-ref [<options>] -d <refname> [<old-oid>]"),
@@ -274,7 +274,7 @@ static void parse_cmd_update(struct ref_transaction *transaction,
}
static void parse_cmd_symref_update(struct ref_transaction *transaction,
- const char *next, const char *end)
+ const char *next, const char *end UNUSED)
{
char *refname, *new_target, *old_arg;
char *old_target = NULL;
@@ -360,7 +360,7 @@ static void parse_cmd_create(struct ref_transaction *transaction,
static void parse_cmd_symref_create(struct ref_transaction *transaction,
- const char *next, const char *end)
+ const char *next, const char *end UNUSED)
{
struct strbuf err = STRBUF_INIT;
char *refname, *new_target;
@@ -423,7 +423,7 @@ static void parse_cmd_delete(struct ref_transaction *transaction,
static void parse_cmd_symref_delete(struct ref_transaction *transaction,
- const char *next, const char *end)
+ const char *next, const char *end UNUSED)
{
struct strbuf err = STRBUF_INIT;
char *refname, *old_target;
@@ -479,7 +479,7 @@ static void parse_cmd_verify(struct ref_transaction *transaction,
}
static void parse_cmd_symref_verify(struct ref_transaction *transaction,
- const char *next, const char *end)
+ const char *next, const char *end UNUSED)
{
struct strbuf err = STRBUF_INIT;
struct object_id old_oid;
@@ -713,7 +713,10 @@ static void update_refs_stdin(void)
strbuf_release(&input);
}
-int cmd_update_ref(int argc, const char **argv, const char *prefix)
+int cmd_update_ref(int argc,
+ const char **argv,
+ const char *prefix,
+ struct repository *repo UNUSED)
{
const char *refname, *oldval;
struct object_id oid, oldoid;