The commit stat summary on MR diff views shows an incorrect amount
Summary
When creating a Merge Request with a lot of changes in a single file causing it to be collapsed in the diff view the commit stat summary displays incorrect stats. It excludes the collapsed lines from the counters. This has been wrong for the last few releases (it has been several months I think).
Steps to reproduce
See jeroenj/commit-stat-summary!1
Expected behavior
You should see the actual stats of the diff including those of collapsed files.
Actual behavior
You only see the stats of expanded files.
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com and our self-hosted enterprise edition of GitLab.
Results of GitLab application Check
Results of GitLab environment info
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.3.3p222
Gem Version: 2.6.6
Bundler Version:1.13.7
Rake Version: 10.5.0
Sidekiq Version:4.2.7
GitLab information
Version: 8.16.4-ee
Revision: 93daa28
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 9.6.1
URL: https://gitlab.openminds.be
HTTP Clone URL: https://gitlab.openminds.be/some-group/some-project.git
SSH Clone URL: git@gitlab.openminds.be:some-group/some-project.git
Elasticsearch: no
Geo: no
Using LDAP: no
Using Omniauth: yes
Omniauth Providers: openminds
GitLab Shell
Version: 4.1.1
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git