From 8fdd419a4469c55e447418f39b248ffcd3c4026a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Wed, 22 Jun 2016 11:26:14 -0400 Subject: [PATCH] Improve performance of searching tags by name by using a memorized tag array --- CHANGELOG | 1 + app/models/repository.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index a2a6710994c..e22314025c4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ v 8.10.0 (unreleased) v 8.9.1 - Fix GitLab project import issues related to notes and builds + - Improve performance of searching repository tags by name by using a memorized tag array - Fix 404 when accessing pipelines as guest user on public projects v 8.9.0 diff --git a/app/models/repository.rb b/app/models/repository.rb index 221c87164ca..acc720ccfa3 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -130,7 +130,7 @@ class Repository end def find_tag(name) - raw_repository.tags.find { |tag| tag.name == name } + tags.find { |tag| tag.name == name } end def add_branch(user, branch_name, target)