Defect #5357 » sort-changes-by-id-for-git-r5074.diff
app/models/repository/git.rb | ||
---|---|---|
18 | 18 |
require 'redmine/scm/adapters/git_adapter' |
19 | 19 | |
20 | 20 |
class Repository::Git < Repository |
21 |
# sort changesets by reverse commit order |
|
22 |
has_many :changesets, :order => "#{Changeset.table_name}.id DESC", :foreign_key => 'repository_id' |
|
23 | ||
21 | 24 |
attr_protected :root_url |
22 | 25 |
validates_presence_of :url |
23 | 26 | |
... | ... | |
124 | 127 |
"scmid IN (?)", |
125 | 128 |
revisions.map!{|c| c.scmid} |
126 | 129 |
], |
127 |
:order => 'committed_on DESC'
|
|
130 |
:order => 'id DESC'
|
|
128 | 131 |
) |
129 | 132 |
end |
130 | 133 |
end |