commit 7e4f461f98ca8599ac26846e9ca24d621574f33b from: Stefan Sperling date: Wed Apr 13 14:01:18 2022 UTC sort references by date for packing; newer commits should be processed first commit - 20e420c8b1505de5032e4c2672147483bd15d616 commit + 7e4f461f98ca8599ac26846e9ca24d621574f33b blob - c1adcc4de91fadddf5e049d93cc9a744c07579bf blob + a2cd689e950dde612d9eb621415378868483d8bf --- lib/repository_admin.c +++ lib/repository_admin.c @@ -75,6 +75,11 @@ get_reflist_object_ids(struct got_object_id ***ids, in *ids = NULL; *nobjects = 0; + err = got_reflist_sort(refs, + got_ref_cmp_by_commit_timestamp_descending, repo); + if (err) + return err; + *ids = reallocarray(NULL, alloc_chunksz, sizeof(struct got_object_id *)); if (*ids == NULL) return got_error_from_errno("reallocarray");