git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: René Scharfe
Message 2 of 2 in “sha1_file: use llist_mergesort() for sorting packs”
  1. sha1_file: use llist_mergesort() for sorting packsRené Scharfe, Sep 13, 2016
  2. Jeff KingSep 13, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.