Unverified Commit 378a3f5c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Use CompareService for compare page


Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 396e71a7b7ec
......@@ -8,14 +8,21 @@ def index
end
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
@commit = compare.commit
@diffs = compare.diffs
@refs_are_same = compare.same
@line_notes = []
@diff_timeout = compare.timeout
compare_result = CompareService.new.execute(
current_user,
@project,
base_ref,
@project,
head_ref
)
@commits = compare_result.commits
@diffs = compare_result.diffs
@commit = @commits.last
@line_notes = []
end
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