Fix issues found by rubocop
This commit is contained in:
parent
0b5a2eef8f
commit
92a438263f
1 changed files with 14 additions and 6 deletions
|
@ -786,7 +786,8 @@ class Repository
|
||||||
@root_ref ||= cache.fetch(:root_ref) { raw_repository.root_ref }
|
@root_ref ||= cache.fetch(:root_ref) { raw_repository.root_ref }
|
||||||
end
|
end
|
||||||
|
|
||||||
def commit_dir(user, path, message, branch,
|
def commit_dir(
|
||||||
|
user, path, message, branch,
|
||||||
author_email: nil, author_name: nil, source_branch: nil)
|
author_email: nil, author_name: nil, source_branch: nil)
|
||||||
update_branch_with_hooks(
|
update_branch_with_hooks(
|
||||||
user,
|
user,
|
||||||
|
@ -806,7 +807,9 @@ class Repository
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def commit_file(user, path, content, message, branch, update,
|
# rubocop:disable Metrics/ParameterLists
|
||||||
|
def commit_file(
|
||||||
|
user, path, content, message, branch, update,
|
||||||
author_email: nil, author_name: nil, source_branch: nil)
|
author_email: nil, author_name: nil, source_branch: nil)
|
||||||
update_branch_with_hooks(
|
update_branch_with_hooks(
|
||||||
user,
|
user,
|
||||||
|
@ -830,8 +833,11 @@ class Repository
|
||||||
Gitlab::Git::Blob.commit(raw_repository, options)
|
Gitlab::Git::Blob.commit(raw_repository, options)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Metrics/ParameterLists
|
||||||
|
|
||||||
def update_file(user, path, content,
|
# rubocop:disable Metrics/ParameterLists
|
||||||
|
def update_file(
|
||||||
|
user, path, content,
|
||||||
branch:, previous_path:, message:,
|
branch:, previous_path:, message:,
|
||||||
author_email: nil, author_name: nil, source_branch: nil)
|
author_email: nil, author_name: nil, source_branch: nil)
|
||||||
update_branch_with_hooks(
|
update_branch_with_hooks(
|
||||||
|
@ -861,8 +867,10 @@ class Repository
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# rubocop:enable Metrics/ParameterLists
|
||||||
|
|
||||||
def remove_file(user, path, message, branch,
|
def remove_file(
|
||||||
|
user, path, message, branch,
|
||||||
author_email: nil, author_name: nil, source_branch: nil)
|
author_email: nil, author_name: nil, source_branch: nil)
|
||||||
update_branch_with_hooks(
|
update_branch_with_hooks(
|
||||||
user,
|
user,
|
||||||
|
@ -885,14 +893,14 @@ class Repository
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def multi_action(user:, branch:, message:, actions:,
|
def multi_action(
|
||||||
|
user:, branch:, message:, actions:,
|
||||||
author_email: nil, author_name: nil, source_branch: nil)
|
author_email: nil, author_name: nil, source_branch: nil)
|
||||||
update_branch_with_hooks(
|
update_branch_with_hooks(
|
||||||
user,
|
user,
|
||||||
branch,
|
branch,
|
||||||
source_branch: source_branch) do |ref|
|
source_branch: source_branch) do |ref|
|
||||||
index = rugged.index
|
index = rugged.index
|
||||||
parents = []
|
|
||||||
|
|
||||||
last_commit = find_branch(ref).dereferenced_target
|
last_commit = find_branch(ref).dereferenced_target
|
||||||
index.read_tree(last_commit.raw_commit.tree)
|
index.read_tree(last_commit.raw_commit.tree)
|
||||||
|
|
Loading…
Reference in a new issue