Links to specific line numbers in files does not work properly
Summary
When looking at a file in the UI, there is an option to create a link to the line number which is very useful for discussions. The problem is that the line numbers are not lining up properly when we create the link. Eventually the line numbers diverge enough that the last lines don't even have line numbers.
Steps to reproduce
Go to a file, a large one is better to see the behaviour as the numbers diverge. Click on the link to copy the url or go directly to it.
What is the current bug behavior?
If you click on the source link it doesn't highlight the line number that you are on and when you open the link the line that is highlighted is not the line that you expect. For larger files if you go to the end of the file you will see no line numbers.
What is the expected correct behavior?
Expect the correct line number that I clicked on to be highlighted when I create the link and when I open the link.
Relevant logs and/or screenshots
Results of GitLab environment info
System information System: Ubuntu 14.04 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: 93daa28c Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 9.2.18 URL: http://gitlab.clearpathrobotics.com HTTP Clone URL: http://gitlab.clearpathrobotics.com/some-group/some-project.git SSH Clone URL: git@gitlab.clearpathrobotics.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: no
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

