diff options
author | Rémy Coutable <remy@rymai.me> | 2017-02-22 14:47:13 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-02-22 14:47:13 +0300 |
commit | 87411889b9c8a778bebafeaa381e1d736af7329a (patch) | |
tree | 338e2628a8b7b95572fb1bacf3ea8b8272c3929c /app/services | |
parent | 99d0bc3d5521785f14330ef8cb2160c2bececeee (diff) | |
parent | c79bbe26ab1e16facddaf159d4d074937586d742 (diff) |
Merge branch '22132-rename-branch-name-params-to-branch' into 'master'
Standardize branch name params as `branch` on V4 API
Closes #22132
See merge request !8936
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/files/multi_service.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/files/multi_service.rb b/app/services/files/multi_service.rb index 6ba868df04d..af6da5b9d56 100644 --- a/app/services/files/multi_service.rb +++ b/app/services/files/multi_service.rb @@ -55,7 +55,7 @@ module Files file_path = action[:file_path] file_path = action[:previous_path] if action[:action] == :move - blob = repository.blob_at_branch(params[:branch_name], file_path) + blob = repository.blob_at_branch(params[:branch], file_path) unless blob raise_error("File to be #{action[:action]}d `#{file_path}` does not exist.") @@ -89,7 +89,7 @@ module Files def validate_create(action) return if project.empty_repo? - if repository.blob_at_branch(params[:branch_name], action[:file_path]) + if repository.blob_at_branch(params[:branch], action[:file_path]) raise_error("Your changes could not be committed because a file with the name `#{action[:file_path]}` already exists.") end end @@ -102,14 +102,14 @@ module Files raise_error("You must supply the original file path when moving file `#{action[:file_path]}`.") end - blob = repository.blob_at_branch(params[:branch_name], action[:file_path]) + blob = repository.blob_at_branch(params[:branch], action[:file_path]) if blob raise_error("Move destination `#{action[:file_path]}` already exists.") end if action[:content].nil? - blob = repository.blob_at_branch(params[:branch_name], action[:previous_path]) + blob = repository.blob_at_branch(params[:branch], action[:previous_path]) blob.load_all_data!(repository) if blob.truncated? params[:actions][index][:content] = blob.data end |