diff options
author | Markus Koller <mkoller@gitlab.com> | 2019-06-13 13:44:41 +0300 |
---|---|---|
committer | Markus Koller <mkoller@gitlab.com> | 2019-07-18 10:19:18 +0300 |
commit | f8cecafb07792bcaf9d7ffa85766c3b33c1dd252 (patch) | |
tree | abafa6e9dbbb602f61b83abff508acbae074ceee /lib/gitlab/git/repository.rb | |
parent | b921b2d1fb0c1cb3e6d4f3c88806855b48827855 (diff) |
Add start_sha to commits API
When passing start_branch on committing from the WebIDE, it's possible
that the branch has changed since editing started, which results in the
change being applied on top of the latest commit in the branch and
overwriting the new changes.
By passing the start_sha instead we can make sure that the change is
applied on top of the commit which the user started editing from.
Diffstat (limited to 'lib/gitlab/git/repository.rb')
-rw-r--r-- | lib/gitlab/git/repository.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index a7d9ba51277..6e8aa5d578e 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -873,13 +873,13 @@ module Gitlab 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_sha: 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, force) + start_branch_name, start_repository, force, start_sha) end end # rubocop:enable Metrics/ParameterLists |