summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/remote.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index d5a5a1663b..7d5c8d2074 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1341,8 +1341,9 @@ static int prune_remote(const char *remote, int dry_run)
const char *refname = states.stale.items[i].util;
delete_refs[i] = refname;
- string_list_insert(&delete_refs_list, refname);
+ string_list_append(&delete_refs_list, refname);
}
+ sort_string_list(&delete_refs_list);
if (!dry_run) {
struct strbuf err = STRBUF_INIT;