Commit a181d675 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'remove-fishy-smell' into 'master'

Allow setting branch refs for MR

@dbalexandre can you take a look please?

See merge request !6025
parents ee61c403 79fd7795
...@@ -240,12 +240,12 @@ class MergeRequest < ActiveRecord::Base ...@@ -240,12 +240,12 @@ class MergeRequest < ActiveRecord::Base
def source_branch_head def source_branch_head
source_branch_ref = @source_branch_sha || source_branch source_branch_ref = @source_branch_sha || source_branch
source_project.repository.commit(source_branch) if source_branch_ref source_project.repository.commit(source_branch_ref) if source_branch_ref
end end
def target_branch_head def target_branch_head
target_branch_ref = @target_branch_sha || target_branch target_branch_ref = @target_branch_sha || target_branch
target_project.repository.commit(target_branch) if target_branch_ref target_project.repository.commit(target_branch_ref) if target_branch_ref
end end
def branch_merge_base_commit def branch_merge_base_commit
......
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