Project

General

Profile

Defect #5357 » sort-changes-by-id-for-git.diff

Pieter Smith, 2010-04-21 10:30

View differences:

app/models/repository/git.rb
46 46
  # The repository can still be fully reloaded by calling #clear_changesets
47 47
  # before fetching changesets (eg. for offline resync)
48 48
  def fetch_changesets
49
    c = changesets.find(:first, :order => 'committed_on DESC')
49
    c = changesets.find(:first, :order => 'id ASC')
50 50
    since = (c ? c.committed_on - 7.days : nil)
51 51

  
52 52
    revisions = scm.revisions('', nil, nil, :all => true, :since => since)
......
75 75
        "scmid IN (?)", 
76 76
        revisions.map!{|c| c.scmid}
77 77
      ],
78
      :order => 'committed_on DESC'
78
      :order => 'id ASC'
79 79
    )
80 80
  end
81 81
end
(2-2/13)