Project

General

Profile

Defect #5357 » git-changeset-order-workaround.diff

Yuya Nishihara, 2010-04-21 17:20

View differences:

app/models/repository/git.rb
49 49
    c = changesets.find(:first, :order => 'committed_on DESC')
50 50
    since = (c ? c.committed_on - 7.days : nil)
51 51

  
52
    revisions = scm.revisions('', nil, nil, :all => true, :since => since)
52
    revisions = scm.revisions('', nil, nil, :all => true, :since => since, :reverse => true)
53 53
    return if revisions.nil? || revisions.empty?
54 54

  
55 55
    recent_changesets = changesets.find(:all, :conditions => ['committed_on >= ?', since])
......
75 75
        "scmid IN (?)", 
76 76
        revisions.map!{|c| c.scmid}
77 77
      ],
78
      :order => 'committed_on DESC'
78
      :order => 'id DESC'
79 79
    )
80 80
  end
81 81
end
(4-4/13)