diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-01-27 17:23:59 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-01-27 17:23:59 +0100 |
commit | 5cce1278adb168cd9fa4f189e3656a59726b4e6c (patch) | |
tree | 61e78e71ef377095abf6e3df3bee5a027ce5989a /app/models/project.rb | |
parent | a93f7099fa2ed98746ebfb5e55322d0afb5068f8 (diff) | |
download | gitlab-ce-5cce1278adb168cd9fa4f189e3656a59726b4e6c.tar.gz |
Correctly determine MR diff base when MR has merge conflicts
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 4bd51449c25..488dc98c17f 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -348,6 +348,10 @@ class Project < ActiveRecord::Base repository.commit(id) end + def merge_base_commit(first_commit_id, second_commit_id) + repository.commit(repository.merge_base(first_commit_id, second_commit_id)) + end + def saved? id && persisted? end |