refs: convert update_ref and refs_update_ref to use struct object_id
[gitweb.git] / builtin / branch.c
index d7a876cca3157f58dfd88936e53f5f52076ab702..f5237541a224f97a2e35cd232b522de9a5b16ea7 100644 (file)
@@ -257,7 +257,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds,
                        goto next;
                }
 
-               if (delete_ref(NULL, name, is_null_oid(&oid) ? NULL : oid.hash,
+               if (delete_ref(NULL, name, is_null_oid(&oid) ? NULL : &oid,
                               REF_NODEREF)) {
                        error(remote_branch
                              ? _("Error deleting remote-tracking branch '%s'")
@@ -744,12 +744,12 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
                else if (argc == 2)
                        copy_or_rename_branch(argv[0], argv[1], 0, rename > 1);
                else
-                       die(_("too many branches for a rename operation"));
+                       die(_("too many arguments for a rename operation"));
        } else if (new_upstream) {
                struct branch *branch = branch_get(argv[0]);
 
                if (argc > 1)
-                       die(_("too many branches to set new upstream"));
+                       die(_("too many arguments to set new upstream"));
 
                if (!branch) {
                        if (!argc || !strcmp(argv[0], "HEAD"))
@@ -772,7 +772,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
                struct strbuf buf = STRBUF_INIT;
 
                if (argc > 1)
-                       die(_("too many branches to unset upstream"));
+                       die(_("too many arguments to unset upstream"));
 
                if (!branch) {
                        if (!argc || !strcmp(argv[0], "HEAD"))