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