Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
2e328c1e
Commit
2e328c1e
authored
Mar 27, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expire the exists cache before deletion to ensure project dir actually exists
Closes #14659
parent
c1834664
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/models/repository.rb
app/models/repository.rb
+2
-0
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+1
-1
No files found.
app/models/repository.rb
View file @
2e328c1e
...
@@ -335,6 +335,8 @@ class Repository
...
@@ -335,6 +335,8 @@ class Repository
# Runs code just before a repository is deleted.
# Runs code just before a repository is deleted.
def
before_delete
def
before_delete
expire_exists_cache
expire_cache
if
exists?
expire_cache
if
exists?
expire_root_ref_cache
expire_root_ref_cache
...
...
spec/models/repository_spec.rb
View file @
2e328c1e
...
@@ -558,7 +558,7 @@ describe Repository, models: true do
...
@@ -558,7 +558,7 @@ describe Repository, models: true do
end
end
it
'flushes the exists cache'
do
it
'flushes the exists cache'
do
expect
(
repository
).
to
receive
(
:expire_exists_cache
)
expect
(
repository
).
to
receive
(
:expire_exists_cache
)
.
twice
repository
.
before_delete
repository
.
before_delete
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment