summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/creates_commit.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-01-06 02:11:27 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-01-06 02:11:27 +0800
commitae86a1b9d3c9ca4ce592fa89085acd059ffc09a0 (patch)
treeed6befd4c3eba826a3bfbfe47b6b275e3c9e34fc /app/controllers/concerns/creates_commit.rb
parent5e12b3d841b0da1a2c6047de53a033107bbb5c32 (diff)
downloadgitlab-ce-ae86a1b9d3c9ca4ce592fa89085acd059ffc09a0.tar.gz
Just trust set_commit_variables to set everything!
Removing those weird setup in assign_change_commit_vars fixed all the failures in the tests. I still cannot say why but clearly we need to have better names. It's so confusing right now. We should seriously stop fiddling those instance variables.
Diffstat (limited to 'app/controllers/concerns/creates_commit.rb')
-rw-r--r--app/controllers/concerns/creates_commit.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb
index 025fca088bf..eafaed8a3d0 100644
--- a/app/controllers/concerns/creates_commit.rb
+++ b/app/controllers/concerns/creates_commit.rb
@@ -4,11 +4,9 @@ module CreatesCommit
def create_commit(service, success_path:, failure_path:, failure_view: nil, success_notice: nil)
set_commit_variables
- source_branch = @ref if
- @ref && @mr_target_project.repository.branch_exists?(@ref)
commit_params = @commit_params.merge(
source_project: @mr_target_project,
- source_branch: source_branch,
+ source_branch: @mr_target_branch,
target_branch: @mr_source_branch
)