Merge branch 'jk/rev-parse-symbolic-parents-fix'
[gitweb.git] / builtin / remote.c
index a4d9c1a8e9c7f0cd36136e26581ba4a3ee828fe8..e52cf3925b2388008221de6f7cbedeecd6cdd010 100644 (file)
@@ -539,10 +539,6 @@ static int add_branch_for_removal(const char *refname,
                return 0;
        }
 
-       /* make sure that symrefs are deleted */
-       if (flags & REF_ISSYMREF)
-               return unlink(git_path("%s", refname));
-
        string_list_append(branches->branches, refname);
 
        return 0;
@@ -788,7 +784,7 @@ static int rm(int argc, const char **argv)
        strbuf_release(&buf);
 
        if (!result)
-               result = delete_refs(&branches);
+               result = delete_refs(&branches, REF_NODEREF);
        string_list_clear(&branches, 0);
 
        if (skipped.nr) {
@@ -1201,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:",
@@ -1304,7 +1299,7 @@ static int prune_remote(const char *remote, int dry_run)
        string_list_sort(&refs_to_prune);
 
        if (!dry_run)
-               result |= delete_refs(&refs_to_prune);
+               result |= delete_refs(&refs_to_prune, 0);
 
        for_each_string_list_item(item, &states.stale) {
                const char *refname = item->util;