summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/repository.rb
diff options
context:
space:
mode:
authorPatrick Bajao <ebajao@gitlab.com>2019-03-06 10:44:59 +0000
committerNick Thomas <nick@gitlab.com>2019-03-06 10:44:59 +0000
commitde5aef3bbda9217e32fc91c24280f78869c9c9c1 (patch)
tree1c2a7468e0b7f31134ee7b6e9f537b798fdf724e /lib/gitlab/git/repository.rb
parentc9e5ce8dbd25203484b43c48f0a55a5d7bf396e8 (diff)
downloadgitlab-ce-de5aef3bbda9217e32fc91c24280f78869c9c9c1.tar.gz
Accept force option on commit via API
When `force` is set to `true` and `start_branch` is set, the branch will be ovewritten with the new commit based on the `HEAD` of the `start_branch`. This commit includes changes to update the `gitaly-proto` gem.
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r--lib/gitlab/git/repository.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 2bfff8397e8..2f8e4e9e93d 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -853,17 +853,20 @@ module Gitlab
true
end
+ # rubocop:disable Metrics/ParameterLists
def multi_action(
user, branch_name:, message:, actions:,
author_email: nil, author_name: nil,
- start_branch_name: nil, start_repository: self)
+ start_branch_name: nil, start_repository: self,
+ force: false)
wrapped_gitaly_errors do
gitaly_operation_client.user_commit_files(user, branch_name,
message, actions, author_email, author_name,
- start_branch_name, start_repository)
+ start_branch_name, start_repository, force)
end
end
+ # rubocop:enable Metrics/ParameterLists
def write_config(full_path:)
return unless full_path.present?