Build diff_refs for merge request if merge request diff does not exist
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
7cb8ceb5b9
commit
fc8d2fbc94
1 changed files with 6 additions and 0 deletions
|
@ -250,6 +250,12 @@ class MergeRequest < ActiveRecord::Base
|
|||
def diff_refs
|
||||
if merge_request_diff
|
||||
merge_request_diff.diff_refs
|
||||
elsif diff_start_commit || diff_base_commit
|
||||
Gitlab::Diff::DiffRefs.new(
|
||||
base_sha: diff_base_sha,
|
||||
start_sha: diff_start_sha,
|
||||
head_sha: diff_head_sha
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue