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:
authorStan Hu <stanhu@gmail.com>2018-08-21 20:47:04 +0300
committerStan Hu <stanhu@gmail.com>2018-08-22 16:28:31 +0300
commit5138d659b5b16ebeadf37165bc461c5906f53e8e (patch)
tree9bd8f39002d58b8312cd0455f2e30e3aa2db13a3 /app/views/projects/merge_requests/creations
parentf3d9e19b02b57a15d9ba34b2bfd8756b3eb8b2bd (diff)
Speed up diff comparisons by limiting number of commit messages rendered
When a diff has a significant number of commits, the previous behavior would attempt to render the Markdown on all the commit messages but only display 1000 of them. To avoid additional work, we only need to render the Markdown on the set that is displayed.
Diffstat (limited to 'app/views/projects/merge_requests/creations')
-rw-r--r--app/views/projects/merge_requests/creations/_new_submit.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/merge_requests/creations/_new_submit.html.haml b/app/views/projects/merge_requests/creations/_new_submit.html.haml
index f7a5d85500f..d5c4134dee2 100644
--- a/app/views/projects/merge_requests/creations/_new_submit.html.haml
+++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml
@@ -33,7 +33,7 @@
%li.commits-tab.new-tab
= link_to url_for(safe_params), data: {target: 'div#commits', action: 'new', toggle: 'tabvue'} do
Commits
- %span.badge.badge-pill= @commits.size
+ %span.badge.badge-pill= @total_commit_count
- if @pipelines.any?
%li.builds-tab
= link_to url_for(safe_params.merge(action: 'pipelines')), data: {target: 'div#pipelines', action: 'pipelines', toggle: 'tabvue'} do