Commit 378a3f5c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use CompareService for compare page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 098ee55e
...@@ -8,14 +8,21 @@ class Projects::CompareController < Projects::ApplicationController ...@@ -8,14 +8,21 @@ class Projects::CompareController < Projects::ApplicationController
end end
def show def show
compare = Gitlab::Git::Compare.new(@repository.raw_repository, params[:from], params[:to], MergeRequestDiff::COMMITS_SAFE_SIZE) base_ref = params[:from]
head_ref = params[:to]
@commits = compare.commits compare_result = CompareService.new.execute(
@commit = compare.commit current_user,
@diffs = compare.diffs @project,
@refs_are_same = compare.same base_ref,
@line_notes = [] @project,
@diff_timeout = compare.timeout head_ref
)
@commits = compare_result.commits
@diffs = compare_result.diffs
@commit = @commits.last
@line_notes = []
end end
def create def create
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment