Commit 28ef06c5 authored by Sean McGivern's avatar Sean McGivern Committed by Fatih Acet

Fix merge conflict reading for new diffs

parent 10321bf8
...@@ -204,7 +204,7 @@ class MergeRequest < ActiveRecord::Base ...@@ -204,7 +204,7 @@ class MergeRequest < ActiveRecord::Base
def diff_start_commit def diff_start_commit
if persisted? if persisted?
merge_request_diff.start_commit merge_request_diff.start_commit || target_branch_head
else else
target_branch_head target_branch_head
end end
...@@ -212,7 +212,7 @@ class MergeRequest < ActiveRecord::Base ...@@ -212,7 +212,7 @@ class MergeRequest < ActiveRecord::Base
def diff_head_commit def diff_head_commit
if persisted? if persisted?
merge_request_diff.head_commit merge_request_diff.head_commit || source_branch_head
else else
source_branch_head source_branch_head
end end
......
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
def initialize(merge_request) def initialize(merge_request)
@merge_request = merge_request @merge_request = merge_request
@our_commit = merge_request.diff_head_commit.raw.raw_commit @our_commit = merge_request.source_branch_head.raw.raw_commit
@their_commit = merge_request.target_branch_head.raw.raw_commit @their_commit = merge_request.target_branch_head.raw.raw_commit
end end
......
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