summaryrefslogtreecommitdiff
path: root/app/services/files
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/files')
-rw-r--r--app/services/files/multi_service.rb8
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