Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-14 15:09:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-14 15:09:14 +0300
commit49089d4fb1f5c17328ac61c955d95a68c6d4d545 (patch)
tree309d97ce6cbc1b22935dd0e11cc72abd767ffcf3 /lib/gitlab/diff/file_collection
parent846a84f2e9d6149b00c63ccae2850421f6766bac (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/diff/file_collection')
-rw-r--r--lib/gitlab/diff/file_collection/merge_request_diff_base.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/gitlab/diff/file_collection/merge_request_diff_base.rb b/lib/gitlab/diff/file_collection/merge_request_diff_base.rb
index 077922dcb64..d54e1aad19a 100644
--- a/lib/gitlab/diff/file_collection/merge_request_diff_base.rb
+++ b/lib/gitlab/diff/file_collection/merge_request_diff_base.rb
@@ -29,13 +29,13 @@ module Gitlab
override :write_cache
def write_cache
highlight_cache.write_if_empty
- diff_stats_cache&.write_if_empty(diff_stats_collection)
+ diff_stats_cache.write_if_empty(diff_stats_collection)
end
override :clear_cache
def clear_cache
highlight_cache.clear
- diff_stats_cache&.clear
+ diff_stats_cache.clear
end
def real_size
@@ -52,9 +52,7 @@ module Gitlab
def diff_stats_cache
strong_memoize(:diff_stats_cache) do
- if Feature.enabled?(:cache_diff_stats_merge_request, project)
- Gitlab::Diff::StatsCache.new(cachable_key: @merge_request_diff.cache_key)
- end
+ Gitlab::Diff::StatsCache.new(cachable_key: @merge_request_diff.cache_key)
end
end
@@ -63,7 +61,7 @@ module Gitlab
strong_memoize(:diff_stats) do
next unless fetch_diff_stats?
- diff_stats_cache&.read || super
+ diff_stats_cache.read || super
end
end
end