Commit 6d93eafa6a0db951afb15f584856a0b18a9ce03b

Authored by Koen Punt
1 parent a09d9382

disabled sorting of commits before compare

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(older.id, younger.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
... ...