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:
authorDouwe Maan <douwe@selenight.nl>2017-11-07 19:11:37 +0300
committerDouwe Maan <douwe@selenight.nl>2017-11-08 14:22:11 +0300
commitfec48c6e170fb0032cece5d8cc3b06bb45caee57 (patch)
treefc281a6272bc9f0670b01cea1134bda123435907 /app/views/projects/commits
parentdc1e6b436268c00bd1fdf3d15597a4656e029b95 (diff)
Use Commit#notes and Note.for_commit_id when possible to make sure we use all the indexes available to us
Diffstat (limited to 'app/views/projects/commits')
-rw-r--r--app/views/projects/commits/_commit.html.haml7
1 files changed, 1 insertions, 6 deletions
diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml
index a16ffb433a5..a66177f20e9 100644
--- a/app/views/projects/commits/_commit.html.haml
+++ b/app/views/projects/commits/_commit.html.haml
@@ -1,11 +1,6 @@
- ref = local_assigns.fetch(:ref)
-- if @note_counts
- - note_count = @note_counts.fetch(commit.id, 0)
-- else
- - notes = commit.notes
- - note_count = notes.user.count
-- cache_key = [project.full_path, commit.id, current_application_settings, note_count, @path.presence, current_controller?(:commits), I18n.locale]
+- cache_key = [project.full_path, commit.id, current_application_settings, @path.presence, current_controller?(:commits), I18n.locale]
- cache_key.push(commit.status(ref)) if commit.status(ref)
= cache(cache_key, expires_in: 1.day) do