Commit d652fa56 authored by tiagonbotelho's avatar tiagonbotelho

refactors to pass values as arguments through options

parent 7759e86b
......@@ -748,8 +748,8 @@ class Repository
update: options[:update]
}
if previous_path
options[:file].merge!(previous_path: previous_path)
if commit_options[:previous_path]
commit_options[:file].merge!(previous_path: commit_options[:previous_path])
Gitlab::Git::Blob.rename(raw_repository, commit_options)
else
......
......@@ -3,7 +3,6 @@ require_relative "base_service"
module Files
class UpdateService < Files::BaseService
def commit
repository.update_file(current_user, @file_path, @file_content,
@target_branch, previous_path: @previous_path,
message: @commit_message, update: true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment