summaryrefslogtreecommitdiff
path: root/app/workers/git_garbage_collect_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/git_garbage_collect_worker.rb')
-rw-r--r--app/workers/git_garbage_collect_worker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/git_garbage_collect_worker.rb b/app/workers/git_garbage_collect_worker.rb
index 2fa3c838f55..a6cefd4d601 100644
--- a/app/workers/git_garbage_collect_worker.rb
+++ b/app/workers/git_garbage_collect_worker.rb
@@ -8,7 +8,9 @@ class GitGarbageCollectWorker
project = Project.find(project_id)
gitlab_shell.gc(project.repository_storage_path, project.path_with_namespace)
- # Expire the branch cache in case garbage collection caused a ref lookup to fail
+ # Refresh the branch cache in case garbage collection caused a ref lookup to fail
project.repository.after_create_branch
+ project.repository.branch_names
+ project.repository.has_visible_content?
end
end