Commit b0f216ba17434250baf387bb3c5878bce0571306

Authored by gitlabhq
1 parent fc177a30

fix sort

Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
app/controllers/projects_controller.rb
... ... @@ -64,7 +64,11 @@ class ProjectsController < ApplicationController
64 64 @heads = @project.repo.heads
65 65 @commits = @heads.map do |h|
66 66 @project.repo.log(h.name, nil, :since => @date)
67   - end.flatten.uniq { |c| c.id }.sort { |x, y| x.committed_date <=> x.committed_date }
  67 + end.flatten.uniq { |c| c.id }
  68 +
  69 + @commits.sort! do |x, y|
  70 + y.committed_date <=> x.committed_date
  71 + end
68 72  
69 73 @messages = project.notes.last_week.limit(40).order("created_at DESC")
70 74 end
... ...