summaryrefslogtreecommitdiff
path: root/app/models/wiki.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 10:34:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 10:34:06 +0000
commit859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch)
treed7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/models/wiki.rb
parent446d496a6d000c73a304be52587cd9bbc7493136 (diff)
downloadgitlab-ce-859a6fb938bb9ee2a317c46dfa4fcc1af49608f0.tar.gz
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
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)