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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-09 09:08:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-09 09:08:14 +0300
commit97576e3dfdc15b26c0a7832608397edd69167351 (patch)
tree90d29c6f48f6df6f9b23d6435baa8a903331a17b /app/models/container_repository.rb
parenta27d3c27d8a81a2d2b7300d6099e94a2bfb30123 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/container_repository.rb')
-rw-r--r--app/models/container_repository.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/container_repository.rb b/app/models/container_repository.rb
index 2d28a81f462..ab895438191 100644
--- a/app/models/container_repository.rb
+++ b/app/models/container_repository.rb
@@ -153,7 +153,8 @@ class ContainerRepository < ApplicationRecord
end
def self.create_from_path!(path)
- build_from_path(path).tap(&:save!)
+ safe_find_or_create_by!(project: path.repository_project,
+ name: path.repository_name)
end
def self.build_root_repository(project)