summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-08-04 19:25:35 +0200
committerDouwe Maan <douwe@selenight.nl>2017-08-04 19:25:35 +0200
commit9c7602d104d5e4de110b01beda37fa470286f1dc (patch)
treee073626cd4d3d55bc063893960100e4c2ada279e /lib/api
parentd41479266d16facdce08974ef76f3fb7539a1530 (diff)
downloadgitlab-ce-9c7602d104d5e4de110b01beda37fa470286f1dc.tar.gz
Fix batch commit API
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/commits.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index bc9f5d93ec1..a1cd8cc0058 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -63,7 +63,8 @@ module API
post ":id/repository/commits" do
authorize! :push_code, user_project
- attrs[:branch_name] = declared_params.delete(:branch)
+ attrs = declared_params
+ attrs[:branch_name] = attrs.delete(:branch)
attrs[:start_branch] ||= attrs[:branch_name]
result = ::Files::MultiService.new(user_project, current_user, attrs).execute