summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 6d9a0e5e813..4017fe31b84 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1460,13 +1460,14 @@ class Project < ApplicationRecord
# Forked import is handled asynchronously
return if forked? && !force
- if gitlab_shell.create_project_repository(self)
- repository.after_create
- true
- else
- errors.add(:base, _('Failed to create repository via gitlab-shell'))
- false
- end
+ repository.create_repository
+ repository.after_create
+
+ true
+ rescue => err
+ Gitlab::ErrorTracking.track_exception(err, project: { id: id, full_path: full_path, disk_path: disk_path })
+ errors.add(:base, _('Failed to create repository'))
+ false
end
def hook_attrs(backward: true)