additions and deletions are reported incorrectly on the commit view
Summary
When looking at the commit additions and deletions are reported incorrectly
Steps to reproduce
In our installation this is visible on almost every commit: Click Repository->Commits->random commit number on the right
Example Project
I was unable to replicate this on gitlab.com
What is the current bug behavior?
The number of additions and deletions does not corresponds to the number reported by the git log --stat
What is the expected correct behavior?
Additions and Deletions should match git log --stat
Relevant logs and/or screenshots
when running
git log --stat
''' $ git show --stat 60aca662
commit 4d4807062c7b5e64d95897a2e86f6463af29c225 (HEAD -> master, tag: xxxxxxx , origin/master, origin/HEAD)
Author: xxxxxxxxxxxxxxxx Date: Wed Jan 3 20:34:06 2018 +0000
xxxxxxxxxxxxxxxxxxxxxx
risk/Trigger/xxxxx_trg.trg | 323 +----------------------------------------- 1 file changed, 2 insertions(+), 321 deletions(-)
'''
Output of checks
Results of GitLab environment info
The version: GitLab Enterprise Edition 10.3.3-ee
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)Checking GitLab Shell ...
GitLab Shell version >= 5.10.2 ? ... OK (5.10.2) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 3/1 ... /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/repository.rb:24: warning: already initialized constant Gitlab::Git::Repository::GITALY_INTERNAL_URL /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/git/repository.rb:21: warning: previous definition of GITALY_INTERNAL_URL was here ok 3/2 ... ok 3/3 ... ok 3/4 ... ok 3/5 ... ok 3/6 ... ok 3/7 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) ..... Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet) Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 3/1 ... yes 3/2 ... yes 3/3 ... yes 3/4 ... yes 3/5 ... yes 3/6 ... yes 3/7 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.5) Git version >= 2.7.3 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 2 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)