diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/gl_repository.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/repo_path.rb | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/gitlab/gl_repository.rb b/lib/gitlab/gl_repository.rb index c2be7f3d63a..a56ca1e39e7 100644 --- a/lib/gitlab/gl_repository.rb +++ b/lib/gitlab/gl_repository.rb @@ -35,5 +35,9 @@ module Gitlab [project, type] end + + def self.default_type + PROJECT + end end end diff --git a/lib/gitlab/repo_path.rb b/lib/gitlab/repo_path.rb index 207a80b7db2..b4f41b9cd9a 100644 --- a/lib/gitlab/repo_path.rb +++ b/lib/gitlab/repo_path.rb @@ -24,7 +24,10 @@ module Gitlab return [project, type, redirected_path] if project end - nil + # When a project did not exist, the parsed repo_type would be empty. + # In that case, we want to continue with a regular project repository. As we + # could create the project if the user pushing is allowed to do so. + [nil, Gitlab::GlRepository.default_type, nil] end def self.find_project(project_path) |