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/wiki.rb')
-rw-r--r--app/models/wiki.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/models/wiki.rb b/app/models/wiki.rb
index 11c10a61d18..45747c0b03c 100644
--- a/app/models/wiki.rb
+++ b/app/models/wiki.rb
@@ -104,7 +104,7 @@ class Wiki
end
def empty?
- list_pages(limit: 1).empty?
+ !repository_exists? || list_pages(limit: 1).empty?
end
def exists?
@@ -256,6 +256,15 @@ class Wiki
def after_post_receive
end
+ override :git_garbage_collect_worker_klass
+ def git_garbage_collect_worker_klass
+ Wikis::GitGarbageCollectWorker
+ end
+
+ def cleanup
+ @repository = nil
+ end
+
private
def commit_details(action, message = nil, title = nil)