mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 21:26:07 +10:00
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.
This commit is contained in:
@@ -300,12 +300,10 @@ class Repository
|
||||
|
||||
# Runs code just before a repository is deleted.
|
||||
def before_delete
|
||||
# FIXME: a repository not existing shouldn't prevent us from flushing caches.
|
||||
if exists?
|
||||
expire_cache
|
||||
expire_root_ref_cache
|
||||
expire_emptiness_caches
|
||||
end
|
||||
expire_cache if exists?
|
||||
|
||||
expire_root_ref_cache
|
||||
expire_emptiness_caches
|
||||
end
|
||||
|
||||
# Runs code just before the HEAD of a repository is changed.
|
||||
|
||||
Reference in New Issue
Block a user