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
Boxiang Sun
gitlab-ce
Commits
8b727fea
Commit
8b727fea
authored
Feb 16, 2018
by
Douwe Maan
Committed by
Stan Hu
Feb 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't cache a nil repository root ref to prevent caching issues
parent
b2363483
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
app/models/repository.rb
app/models/repository.rb
+2
-6
changelogs/unreleased/dm-dont-cache-nil-root-ref.yml
changelogs/unreleased/dm-dont-cache-nil-root-ref.yml
+5
-0
No files found.
app/models/repository.rb
View file @
8b727fea
...
...
@@ -492,12 +492,8 @@ class Repository
end
def
root_ref
if
raw_repository
raw_repository
.
root_ref
else
# When the repo does not exist we raise this error so no data is cached.
raise
Gitlab
::
Git
::
Repository
::
NoRepository
end
# When the repo does not exist, or there is no root ref, we raise this error so no data is cached.
raw_repository
&
.
root_ref
or
raise
Gitlab
::
Git
::
Repository
::
NoRepository
# rubocop:disable Style/AndOr
end
cache_method
:root_ref
...
...
changelogs/unreleased/dm-dont-cache-nil-root-ref.yml
0 → 100644
View file @
8b727fea
---
title
:
Don't cache a nil repository root ref to prevent caching issues
merge_request
:
author
:
type
:
fixed
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