diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-02-02 12:24:30 -0200 |
---|---|---|
committer | Oswaldo Ferreira <oswluizf@gmail.com> | 2017-02-21 16:33:14 -0300 |
commit | c79bbe26ab1e16facddaf159d4d074937586d742 (patch) | |
tree | 8b62ca587ac78806aa59fd53fba67e375e84fca6 /app/services/files | |
parent | 51546e26d7aa904a69090004de57d03dbe7268d7 (diff) | |
download | gitlab-ce-c79bbe26ab1e16facddaf159d4d074937586d742.tar.gz |
Change branch_name param to branch throughout V4 API22132-rename-branch-name-params-to-branch
Diffstat (limited to 'app/services/files')
-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 |