diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-03-18 17:51:11 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2019-03-26 13:21:03 +0100 |
commit | d36415b7545fff543f08a5175790e3a92f383475 (patch) | |
tree | b88dfef2992af721191b790ac7a5bc6f1b9eb90b /app/models/project_wiki.rb | |
parent | d64452ebfc262cfc1324fcaf116e74bc436413d3 (diff) | |
download | gitlab-ce-d36415b7545fff543f08a5175790e3a92f383475.tar.gz |
Allow multiple repositories per project
This changes the repository type from a binary `wiki?` to a type. So
we can have more than 2 repository types.
Now everywhere we called `.wiki?` and expected a boolean, we check
that type.
Diffstat (limited to 'app/models/project_wiki.rb')
-rw-r--r-- | app/models/project_wiki.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb index 6ea0716c192..268706a6aea 100644 --- a/app/models/project_wiki.rb +++ b/app/models/project_wiki.rb @@ -59,7 +59,7 @@ class ProjectWiki # Returns the Gitlab::Git::Wiki object. def wiki @wiki ||= begin - gl_repository = Gitlab::GlRepository.gl_repository(project, true) + gl_repository = Gitlab::GlRepository::WIKI.identifier_for_subject(project) raw_repository = Gitlab::Git::Repository.new(project.repository_storage, disk_path + '.git', gl_repository, full_path) create_repo!(raw_repository) unless raw_repository.exists? @@ -151,7 +151,7 @@ class ProjectWiki end def repository - @repository ||= Repository.new(full_path, @project, disk_path: disk_path, is_wiki: true) + @repository ||= Repository.new(full_path, @project, disk_path: disk_path, repo_type: Gitlab::GlRepository::WIKI) end def default_branch |