Commit 24676ad6 authored by Stan Hu's avatar Stan Hu

Merge branch 'ce-to-ee-2018-02-17' into 'master'

CE upstream - 2018-02-17 09:44 UTC

See merge request gitlab-org/gitlab-ee!4584
parents 1488e815 29eae29c
...@@ -499,12 +499,8 @@ class Repository ...@@ -499,12 +499,8 @@ class Repository
end end
def root_ref def root_ref
if raw_repository # 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 raw_repository&.root_ref or raise Gitlab::Git::Repository::NoRepository # rubocop:disable Style/AndOr
else
# When the repo does not exist we raise this error so no data is cached.
raise Gitlab::Git::Repository::NoRepository
end
end end
cache_method :root_ref cache_method :root_ref
......
---
title: Don't cache a nil repository root ref to prevent caching issues
merge_request:
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment