git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* for-each-ref output order change in 2.7.0
@ 2016-01-09  1:07 Bryan Turner
  2016-01-09 15:40 ` Matthieu Moy
  0 siblings, 1 reply; 6+ messages in thread
From: Bryan Turner @ 2016-01-09  1:07 UTC (permalink / raw)
  To: Git Users

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. 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-01-10  9:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-09  1:07 for-each-ref output order change in 2.7.0 Bryan Turner
2016-01-09 15:40 ` Matthieu Moy
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).