Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index b747b71ae68..73256df0591 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -747,7 +747,7 @@ class Repository
end
# rubocop:disable Metrics/ParameterLists
- def commit_dir(
+ def create_dir(
user, path,
message:, branch_name:,
author_email: nil, author_name: nil,
@@ -778,14 +778,12 @@ class Repository
# rubocop:enable Metrics/ParameterLists
# rubocop:disable Metrics/ParameterLists
- def commit_file(
+ def create_file(
user, path, content,
- message:, branch_name:, update: true,
+ message:, branch_name:,
author_email: nil, author_name: nil,
start_branch_name: nil, start_project: project)
- action = update ? :update : :create
-
multi_action(
user: user,
message: message,
@@ -794,7 +792,7 @@ class Repository
author_name: author_name,
start_branch_name: start_branch_name,
start_project: start_project,
- actions: [{ action: action,
+ actions: [{ action: :create,
file_path: path,
content: content }])
end
@@ -803,7 +801,7 @@ class Repository
# rubocop:disable Metrics/ParameterLists
def update_file(
user, path, content,
- message:, branch_name:, previous_path:,
+ message:, branch_name:, previous_path: nil,
author_email: nil, author_name: nil,
start_branch_name: nil, start_project: project)
action = if previous_path && previous_path != path
@@ -828,7 +826,7 @@ class Repository
# rubocop:enable Metrics/ParameterLists
# rubocop:disable Metrics/ParameterLists
- def remove_file(
+ def delete_file(
user, path,
message:, branch_name:,
author_email: nil, author_name: nil,