Merge branch 'cc/replace-with-the-same-type'
[gitweb.git] / builtin / replace.c
index d4d1b75aded73dd0224096dbd2a82012e01ac8d6..b1bd3ef9946761b146a38d5977a7378175cda047 100644 (file)
@@ -115,7 +115,7 @@ static int replace_object(const char *object_ref, const char *replace_ref,
        else if (!force)
                die("replace ref '%s' already exists", ref);
 
-       lock = lock_any_ref_for_update(ref, prev, 0);
+       lock = lock_any_ref_for_update(ref, prev, 0, NULL);
        if (!lock)
                die("%s: cannot lock the ref", ref);
        if (write_ref_sha1(lock, repl, NULL) < 0)
@@ -128,9 +128,9 @@ int cmd_replace(int argc, const char **argv, const char *prefix)
 {
        int list = 0, delete = 0, force = 0;
        struct option options[] = {
-               OPT_BOOLEAN('l', "list", &list, N_("list replace refs")),
-               OPT_BOOLEAN('d', "delete", &delete, N_("delete replace refs")),
-               OPT_BOOLEAN('f', "force", &force, N_("replace the ref if it exists")),
+               OPT_BOOL('l', "list", &list, N_("list replace refs")),
+               OPT_BOOL('d', "delete", &delete, N_("delete replace refs")),
+               OPT_BOOL('f', "force", &force, N_("replace the ref if it exists")),
                OPT_END()
        };