提交 7307fa48 编写于 作者: R Rubén Dávila

Fix broken specs. #3945

上级 f547e733
......@@ -104,7 +104,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@commit = @merge_request.last_commit
@first_commit = @merge_request.first_commit
@diffs = @merge_request.compare_diffs
@diff_refs = [@merge_request.target_sha, @merge_request.source_sha]
# We need to use #source_branch because #source_sha requires an existent MergeRequestDiff object.
@diff_refs = [@merge_request.target_sha, @merge_request.source_branch]
@ci_commit = @merge_request.ci_commit
@statuses = @ci_commit.statuses if @ci_commit
......
......@@ -73,7 +73,7 @@ module Gitlab
# Only update text if line is found. This will prevent
# issues with submodules given the line only exists in diff content.
line.text = highlighted_line.gsub!(/\A\s/, line_prefix) if line
line.text = highlighted_line.gsub!(/\A\s/, line_prefix) if highlighted_line
end
@lines
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册