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

Re: t3203: --sort=objectsize failure on Windows

From
Karthik Nayak <karthik.188@gmail.com>
Date
Oct 24, 2015, 14:25 UTC
Message-ID
<CAOLa=ZRB6_jyyg-M7h8EMtNt96VhXF2hvvKp9OGMvXyJEZB1mw@mail.gmail.com>
In-Reply-To
<562B3807.2030203@kdbg.org>
On Sat, Oct 24, 2015 at 1:19 PM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 5 quoted lines
> On Windows, I observe a failure of the test case 'git branch `--sort`
> option' introduced by aedcb7dc (branch.c: use 'ref-filter' APIs). The reason
> is that the resulting order generated by qsort is unspecified for entries
> that compare equal. In fact, the test case sorts 4 entries where there are
> only 2 different values.

Thanks for reporting the error. Although I couldn't reproduce this on a Linux environment. I get what the problem is.

>
> To achieve a deterministic order, perhaps cmp_ref_sorting() should fall back
> to alphabetic comparison if the other criterion (when used) compares equal?
>
Seems like a simple and good way to go around this. will reply with a patch.
-- 
Regards,
Karthik Nayak
Previous: Johannes SixtNext: Karthik Nayak
Message 2 of 5 in “t3203: --sort=objectsize failure on Windows”
  1. Johannes SixtOct 24, 2015
  2. Karthik NayakOct 24, 2015
  3. ref-filter: fallback on alphabetical comparisonKarthik Nayak, Oct 24, 2015
  4. Eric SunshineOct 25, 2015
  5. Karthik NayakOct 25, 2015

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.