Re: [PATCH] sha1_file: use llist_mergesort() for sorting packs
- From
Jeff King <peff@peff.net>
- Date
- Sep 13, 2016, 18:13 UTC
- Message-ID
- <20160913181325.32sdyyaf5dholjy2@sigill.intra.peff.net>
- In-Reply-To
- <a313343b-173e-4a07-f383-859a6f262651@web.de>
On Tue, Sep 13, 2016 at 07:54:42PM +0200, René Scharfe wrote:
> Sort the linked list of packs directly using llist_mergesort() instead > of building an array, calling qsort(3) and fixing up the list pointers. > This is shorter and less complicated.
Makes sense.
> Peff: Or do you have other plans, e.g. to replace packed_git with > packed_git_mru completely?
Nope. I haven't looked into it, but I think there would be some benefit to replacing packed_git_mru with the code in list.h. But I don't see any benefit in replacing packed_git with that, or with the MRU itself (once list.h is in use, one _could_ shove the MRU into packed_git itself, but I think we would still retain the original link order for reference).
Thanks for asking.
-Peff