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

Re: Bugreport: Prefix - is ignored when sorting (on committerdate)

From
Jeff King <peff@peff.net>
Date
Jan 10, 2023, 13:47 UTC
Message-ID
<Y71scwT5d74Daw0E@coredump.intra.peff.net>
In-Reply-To
<CALDp=1GBtibTR5SvG8sOX14aODtdEJWhL_PCP1mzTLmX9V0sow@mail.gmail.com>
On Tue, Jan 10, 2023 at 02:33:14PM +0100, Fredrik Öberg wrote:
> I am trying to understand what I did wrong. I guess you are saying
> that I tried to use the field committerdate, which is not available on
> the tags?

Right. The committerdate of a tag is a blank string, so sorting on it was not doing anything.

> And that the handling of this situation has changed since
> git/2.23? Hence I got different results?

Sort of. Your committerdate sort was always doing nothing, but due to the buggy way that the sort handled ties in 2.23 and older, it happened to do a reverse refname sort instead of a forward refname sort. Now it does a forward refname sort to break ties.

But the most important change for you is to actually do a real date sort, so the tie-breaking should not be important either way.

-Peff
Previous: Fredrik Öberg
Message 6 of 6 in “Bugreport: Prefix - is ignored when sorting (on committerdate)”
  1. Fredrik ÖbergJan 10, 2023
  2. Martin ÅgrenJan 10, 2023
  3. Jeff KingJan 10, 2023
  4. Martin ÅgrenJan 10, 2023
  5. Fredrik ÖbergJan 10, 2023
  6. Jeff KingJan 10, 2023

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.