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

Re: [PATCH] ref-filter: format iteratively with lexicographic refname sorting

From
Taylor Blau <me@ttaylorr.com>
Date
Oct 16, 2024, 22:11 UTC
Message-ID
<ZxA6I67FfPe4fV2F@nand.local>
In-Reply-To
<a873ed828ccae426214cc8f87610df97ff9a269e.1729055871.git.ps@pks.im>
On Wed, Oct 16, 2024 at 08:00:30AM +0200, Patrick Steinhardt wrote:
Show 15 quoted lines
> But there is one exception here where we _can_ get away with sorting
> refs while streaming: ref backends sort references returned by their
> iterators in lexicographic order. So if the following conditions are all
> true we can do iterative streaming:
>
>   - The caller uses at most a single name pattern. Otherwise we'd have
>     to sort results from multiple invocations of the iterator.
>
>   - There must be at most a single sorting specification, as otherwise
>     we're not using plain lexicographic ordering.
>
>   - The sorting specification must use the "refname".
>
>   - The sorting specification must not be using any flags, like
>     case-insensitive sorting.

Perhaps a niche case, but what about ancient packed-refs files that were written before the 'sorted' capability was introduced?

Thanks, Taylor

Previous: Patrick SteinhardtNext: Jeff King
Message 2 of 12 in “ref-filter: format iteratively with lexicographic refname sorting”
  1. ref-filter: format iteratively with lexicographic refname sortingPatrick Steinhardt, Oct 16, 2024
  2. Taylor BlauOct 16, 2024
  3. Jeff KingOct 17, 2024
  4. Patrick SteinhardtOct 17, 2024
  5. karthik nayakOct 21, 2024
  6. Taylor BlauOct 21, 2024
  7. ref-filter: format iteratively with lexicographic refname sortingPatrick Steinhardt, Oct 17, 2024
  8. Taylor BlauOct 17, 2024
  9. Toon ClaesOct 21, 2024
  10. Patrick SteinhardtOct 21, 2024
  11. ref-filter: format iteratively with lexicographic refname sortingPatrick Steinhardt, Oct 21, 2024
  12. Taylor BlauOct 21, 2024

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.