提交 3b520efd 编写于 作者: Y Yorick Peterse

Moved exists condition in Repository#before_delete

This is only needed when calling the "expire_cache" method as the other
expiration methods don't depend on Git data.
上级 a39f7b30
...@@ -300,13 +300,11 @@ class Repository ...@@ -300,13 +300,11 @@ class Repository
# Runs code just before a repository is deleted. # Runs code just before a repository is deleted.
def before_delete def before_delete
# FIXME: a repository not existing shouldn't prevent us from flushing caches. expire_cache if exists?
if exists?
expire_cache
expire_root_ref_cache expire_root_ref_cache
expire_emptiness_caches expire_emptiness_caches
end end
end
# Runs code just before the HEAD of a repository is changed. # Runs code just before the HEAD of a repository is changed.
def before_change_head def before_change_head
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册