Dashboard perfomance improved. Filter for projects page

This commit is contained in:
Dmitriy Zaporozhets 2011-12-20 08:24:14 +02:00
parent 6d5c969872
commit cff9519127
16 changed files with 215 additions and 112 deletions

View file

@ -35,9 +35,8 @@ class MergeRequest < ActiveRecord::Base
end
def diffs
commit = project.commit(source_branch)
commits = project.repo.commits_between(target_branch, source_branch).map {|c| Commit.new(c)}
diffs = project.repo.diff(commits.first.prev_commit.id, commits.last.id)
diffs = project.repo.diff(commits.first.prev_commit.id, commits.last.id) rescue []
end
def last_commit