From: Matthieu Moy <matthieu.moy@grenoble-inp.fr>
To: Bryan Turner <bturner@atlassian.com>,
Karthik Nayak <karthik.188@gmail.com>
Cc: Git Users <git@vger.kernel.org>
Subject: Re: for-each-ref output order change in 2.7.0
Date: Sat, 9 Jan 2016 16:40:02 +0100 (CET) [thread overview]
Message-ID: <1674931730.811704.1452354002885.JavaMail.zimbra@imag.fr> (raw)
In-Reply-To: <CAGyf7-FSP3Z7HO=LpoQck8q9sSj3fGYCx1=gNa6fXEkovxAxHw@mail.gmail.com>
Hi,
Cc-ing Karthik to draw his attention on the message.
----- Original Message -----
> In one of our tests, we have a set of branches whose names are all
> special characters (%, @, etc). Most of them branches have identical
> tip commits and just have different names. In 2.7.0, when ordering by
> -committerdate, the branches are now returned in a different order. I
> don't think this is a bug, based on the commit it bisects to, but I'm
> wondering if someone can confirm.
>
> 2.6.5 and prior (tested all the way back to 1.7.6, so this was
> consistent for a long time):
>
> refs/heads/!@#% -> Tue Jan 3 17:04:06 2012 +1100
> refs/heads/!@#$% -> Tue Jan 3 17:00:51 2012 +1100
> refs/heads/% -> Tue Jan 3 17:00:51 2012 +1100
> refs/heads/@#$% -> Tue Jan 3 17:00:51 2012 +1100
> refs/heads/@#% -> Tue Jan 3 17:00:51 2012 +1100
>
> 2.7.0:
>
> refs/heads/!@#% -> Tue Jan 3 17:04:06 2012 +1100
> refs/heads/@#% -> Tue Jan 3 17:00:51 2012 +1100
> refs/heads/@#$% -> Tue Jan 3 17:00:51 2012 +1100
> refs/heads/% -> Tue Jan 3 17:00:51 2012 +1100
> refs/heads/!@#$% -> Tue Jan 3 17:00:51 2012 +1100
>
> I've bisected this back to:
>
> bturner@ubuntu:~/Development/oss/git/git$ git bisect bad
> 9e468334b41c1d1fc715de177ef1f61a36c1cf01 is the first bad commit
> commit 9e468334b41c1d1fc715de177ef1f61a36c1cf01
> Author: Karthik Nayak <karthik.188@gmail.com>
> Date: Fri Oct 30 14:15:28 2015 +0530
>
> ref-filter: fallback on alphabetical comparison
>
> The message for that commit indicates that sorting numerics (which I
> assume is the implementation for committerdate) now falls back on
> alphabetical for identical values, suggesting this order change is
> actually intentional and correct.
And also that the previous order was arbitrary (just letting the sort
algorithm chose which one to put first in case of equality on the main
sorting criterion), so the fact that it was stable previously is more
or less just luck. Now it should be stable.
> Is that right?
>
> (Note: The alphabetical-ness of the branch names is reversed, which
> seems logical given my original sort was -committerdate. A
> --sort=refname looks like this.
>
> refs/heads/!@#$% -> Tue Jan 3 17:00:51 2012 +1100
> refs/heads/!@#% -> Tue Jan 3 17:04:06 2012 +1100
> refs/heads/% -> Tue Jan 3 17:00:51 2012 +1100
> refs/heads/@#$% - >Tue Jan 3 17:00:51 2012 +1100
> refs/heads/@#% -> Tue Jan 3 17:00:51 2012 +1100
>
> That's probably more correct too.)
>
> Best regards,
> Bryan Turner
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2016-01-09 16:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-09 1:07 for-each-ref output order change in 2.7.0 Bryan Turner
2016-01-09 15:40 ` Matthieu Moy [this message]
2016-01-09 17:21 ` Karthik Nayak
2016-01-09 18:00 ` Johannes Sixt
2016-01-09 21:29 ` Karthik Nayak
2016-01-10 9:51 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1674931730.811704.1452354002885.JavaMail.zimbra@imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=bturner@atlassian.com \
--cc=git@vger.kernel.org \
--cc=karthik.188@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.