From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Sixt Subject: t3203: --sort=objectsize failure on Windows Date: Sat, 24 Oct 2015 09:49:27 +0200 Message-ID: <562B3807.2030203@kdbg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Git Mailing List To: Karthik Nayak X-From: git-owner@vger.kernel.org Sat Oct 24 09:49:36 2015 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zpta3-0000hN-B6 for gcvg-git-2@plane.gmane.org; Sat, 24 Oct 2015 09:49:35 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751253AbbJXHtb (ORCPT ); Sat, 24 Oct 2015 03:49:31 -0400 Received: from bsmtp4.bon.at ([195.3.86.186]:15696 "EHLO bsmtp4.bon.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750892AbbJXHtb (ORCPT ); Sat, 24 Oct 2015 03:49:31 -0400 Received: from dx.site (unknown [93.83.142.38]) by bsmtp4.bon.at (Postfix) with ESMTPSA id 3njZMD37Pjz5tlJ; Sat, 24 Oct 2015 09:49:28 +0200 (CEST) Received: from [IPv6:::1] (localhost [IPv6:::1]) by dx.site (Postfix) with ESMTP id AD22F537B; Sat, 24 Oct 2015 09:49:27 +0200 (CEST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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. To achieve a deterministic order, perhaps cmp_ref_sorting() should fall back to alphabetic comparison if the other criterion (when used) compares equal? -- Hannes