Commit 450c434ac244a8e390d8cfcb999dc725b720e8ce
Exists in
master
and in
4 other branches
Merge pull request #2314 from koenpunt/gh-issue-513
Disabled sorting commit ids
Showing
1 changed file
with
4 additions
and
8 deletions
Show diff stats
app/models/commit.rb
| ... | ... | @@ -87,14 +87,10 @@ class Commit |
| 87 | 87 | last = project.commit(from.try(:strip)) |
| 88 | 88 | |
| 89 | 89 | if first && last |
| 90 | - commits = [first, last].sort_by(&:created_at) | |
| 91 | - younger = commits.first | |
| 92 | - older = commits.last | |
| 93 | - | |
| 94 | - result[:same] = (younger.id == older.id) | |
| 95 | - result[:commits] = project.repo.commits_between(younger.id, older.id).map {|c| Commit.new(c)} | |
| 96 | - result[:diffs] = project.repo.diff(younger.id, older.id) rescue [] | |
| 97 | - result[:commit] = Commit.new(older) | |
| 90 | + result[:same] = (first.id == last.id) | |
| 91 | + result[:commits] = project.repo.commits_between(last.id, first.id).map {|c| Commit.new(c)} | |
| 92 | + result[:diffs] = project.repo.diff(last.id, first.id) rescue [] | |
| 93 | + result[:commit] = Commit.new(first) | |
| 98 | 94 | end |
| 99 | 95 | |
| 100 | 96 | result | ... | ... |