diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-12-07 19:50:08 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-12-07 19:50:08 +0800 |
commit | 6ae1a73cfdad4b98176bb99846042d4378119de2 (patch) | |
tree | 501de5fd5ab59d3cca7d5fa8412eb20d76da776a /app/services/commits | |
parent | 65806ec632f2ea1e2087b7cdc64f13e6db49c88a (diff) | |
download | gitlab-ce-6ae1a73cfdad4b98176bb99846042d4378119de2.tar.gz |
Pass source_branch properly for cherry-pick/revert
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237/diffs#note_19210818
Diffstat (limited to 'app/services/commits')
-rw-r--r-- | app/services/commits/change_service.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/services/commits/change_service.rb b/app/services/commits/change_service.rb index 04b28cfaed8..5458f7a6790 100644 --- a/app/services/commits/change_service.rb +++ b/app/services/commits/change_service.rb @@ -31,7 +31,14 @@ module Commits if tree_id validate_target_branch(into) if @create_merge_request - repository.public_send(action, current_user, @commit, into, tree_id) + repository.public_send( + action, + current_user, + @commit, + into, + tree_id, + source_branch: @target_branch) + success else error_msg = "Sorry, we cannot #{action.to_s.dasherize} this #{@commit.change_type_title} automatically. |