diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2017-09-19 17:09:10 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-09-19 17:09:10 +0000 |
commit | 75509fac17790bae546b2905aa684f85fdbd9c86 (patch) | |
tree | c4c81ad9857eb18f61597ff629b76fc3132ece17 /app/services/commits | |
parent | f13158a090066b7266096ae58506d0d7611b5600 (diff) | |
download | gitlab-ce-75509fac17790bae546b2905aa684f85fdbd9c86.tar.gz |
Prepare cherry-pick and revert for migration to Gitaly
Diffstat (limited to 'app/services/commits')
-rw-r--r-- | app/services/commits/change_service.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/commits/change_service.rb b/app/services/commits/change_service.rb index 85c2fcf9ea6..b9d0173a2d0 100644 --- a/app/services/commits/change_service.rb +++ b/app/services/commits/change_service.rb @@ -12,14 +12,18 @@ module Commits raise NotImplementedError unless repository.respond_to?(action) # rubocop:disable GitlabSecurity/PublicSend + message = @commit.public_send(:"#{action}_message", current_user) + + # rubocop:disable GitlabSecurity/PublicSend repository.public_send( action, current_user, @commit, @branch_name, + message, start_project: @start_project, start_branch_name: @start_branch) - rescue Repository::CreateTreeError + rescue Gitlab::Git::Repository::CreateTreeError error_msg = "Sorry, we cannot #{action.to_s.dasherize} this #{@commit.change_type_title(current_user)} automatically. This #{@commit.change_type_title(current_user)} may already have been #{action.to_s.dasherize}ed, or a more recent commit may have updated some of its content." raise ChangeError, error_msg |