delete_ref: accept a reflog message argument
[gitweb.git] / builtin / remote.c
index be1b62683aad76c2657af946bc212cbfdf2a2f21..2b415911bfbc3438c48f5ad645bf5d9cc4612943 100644 (file)
@@ -691,7 +691,7 @@ static int mv(int argc, const char **argv)
                read_ref_full(item->string, RESOLVE_REF_READING, oid.hash, &flag);
                if (!(flag & REF_ISSYMREF))
                        continue;
-               if (delete_ref(item->string, NULL, REF_NODEREF))
+               if (delete_ref(NULL, item->string, NULL, REF_NODEREF))
                        die(_("deleting '%s' failed"), item->string);
        }
        for (i = 0; i < remote_branches.nr; i++) {
@@ -1197,8 +1197,7 @@ static int show(int argc, const char **argv)
 
                info.width = info.width2 = 0;
                for_each_string_list(&states.push, add_push_to_show_info, &info);
-               qsort(info.list->items, info.list->nr,
-                       sizeof(*info.list->items), cmp_string_with_push);
+               QSORT(info.list->items, info.list->nr, cmp_string_with_push);
                if (info.list->nr)
                        printf_ln(Q_("  Local ref configured for 'git push'%s:",
                                     "  Local refs configured for 'git push'%s:",
@@ -1249,7 +1248,7 @@ static int set_head(int argc, const char **argv)
                        head_name = xstrdup(states.heads.items[0].string);
                free_remote_ref_states(&states);
        } else if (opt_d && !opt_a && argc == 1) {
-               if (delete_ref(buf.buf, NULL, REF_NODEREF))
+               if (delete_ref(NULL, buf.buf, NULL, REF_NODEREF))
                        result |= error(_("Could not delete %s"), buf.buf);
        } else
                usage_with_options(builtin_remote_sethead_usage, options);