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:
authorBrett Walker <bwalker@gitlab.com>2017-10-11 15:15:28 +0300
committerBrett Walker <bwalker@gitlab.com>2017-10-11 15:15:28 +0300
commit6d3eea7b46d4b363b39a59e1fa17264de33d14d1 (patch)
tree4f9cd61ee9a64fbff0763dd33b07dad8bd9717fb /app/controllers/projects/commit_controller.rb
parenta11077e9d3d6f8c588371facd847bb77868b1e68 (diff)
if the branch/tag count is over a certain limit, don't execute
the long running git query
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r--app/controllers/projects/commit_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index a62f05db7db..893763862ba 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -56,8 +56,8 @@ class Projects::CommitController < Projects::ApplicationController
end
def branches
- @branches = @project.repository.branch_names_contains(commit.id)
- @tags = @project.repository.tag_names_contains(commit.id)
+ @branches = @project.repository.branch_names_contains(commit.id, 1000)
+ @tags = @project.repository.tag_names_contains(commit.id, 1000)
render layout: false
end