summaryrefslogtreecommitdiff
path: root/app/controllers/projects/compare_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-01-27 17:23:59 +0100
committerDouwe Maan <douwe@selenight.nl>2016-01-27 17:23:59 +0100
commit5cce1278adb168cd9fa4f189e3656a59726b4e6c (patch)
tree61e78e71ef377095abf6e3df3bee5a027ce5989a /app/controllers/projects/compare_controller.rb
parenta93f7099fa2ed98746ebfb5e55322d0afb5068f8 (diff)
downloadgitlab-ce-5cce1278adb168cd9fa4f189e3656a59726b4e6c.tar.gz
Correctly determine MR diff base when MR has merge conflicts
Diffstat (limited to 'app/controllers/projects/compare_controller.rb')
-rw-r--r--app/controllers/projects/compare_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb
index f8ec76cd4e5..7bbe75b3974 100644
--- a/app/controllers/projects/compare_controller.rb
+++ b/app/controllers/projects/compare_controller.rb
@@ -21,7 +21,7 @@ class Projects::CompareController < Projects::ApplicationController
@commits = Commit.decorate(compare_result.commits, @project)
@diffs = compare_result.diffs
@commit = @project.commit(head_ref)
- @base_commit = @project.commit(base_ref)
+ @base_commit = @project.merge_base_commit(base_ref, head_ref)
@diff_refs = [@base_commit, @commit]
@line_notes = []
end