Browse file link pointing to wrong file in GROUP/REPO/commits/{path/to/file}
Summary
When browsing to a file, and select Commits, one of the commits has the wrong file path in the "Browse File" link. The particular commit in question has over 1000 files. If click on the commit hash, message says "Too many commits to show. To preserve performance only 1000 of 1000+ files are displayed."
Other Browse File links are correctly pointing to the file being browsed.
Steps to reproduce
Commit more than 1000 files. (Assumption!!) Navigate to a file in the commit. Click on "Commits" tab. Click on "Browse File" button in the large commit.
Example Project
Internal project. Sorry!
What is the current bug behavior?
The link takes you to another file in the commit.
What is the expected correct behavior?
The link should take you to the file being browsed.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: CentOS 7.3.1611 Proxy: no 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 Redis Version: 3.2.5 Sidekiq Version:4.2.7
GitLab information Version: 8.17.3-ee Revision: 33f4b58 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.2.18 URL: https://sig-gitlab.internal.synopsys.com HTTP Clone URL: https://sig-gitlab.internal.synopsys.com/some-group/some-project.git SSH Clone URL: git@sig-gitlab.internal.synopsys.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers: github
GitLab Shell Version: 4.1.1 Repository storage paths:
- default: /remote/sigsrc/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/ Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 4.1.1 ? ... OK (4.1.1) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ...
(snipped lots of #/## ... ok and #/## ... repository is empty)
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Access to /var/opt/gitlab/.ssh/authorized_keys: OK Send ping to redis server: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
Server: ldapmain LDAP authentication... Success
(snipped list of users with access)
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config outdated? ... no Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory setup correctly? ... no Try fixing it: sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} ; sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} ; For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. 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: ...
(snipped lots of #/## ... yes)
Redis version >= 2.8.0? ... yes Ruby version >= 2.1.0 ? ... yes (2.3.3) Your git bin path is "/opt/gitlab/embedded/bin/git" Git version >= 2.7.3 ? ... yes (2.10.2) Active users: 359
Checking GitLab ... Finished
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)