"Browse File" when viewing commits for file should follow renames
Summary
When viewing commits for some specific file(blob), with some commits, clicking "Browse File" will direct you to some other file. It seems to happen when the file was renamed at that point in time.
Steps to reproduce
- Visit https://gitlab.com/gitlab-org/gitlab-ce/commits/f6624b5ce433b7148287e898f164476608868433/app/assets/javascripts/merge_request_tabs.js.es6
- Click "Browse File" on the
aaa9509dcommit - Notice how it goes to https://gitlab.com/gitlab-org/gitlab-ce/blob/aaa9509d120524573085e94af9de5cdde83e3271/app/assets/javascripts/lib/utils/notify.js instead of
merge_request_tabs.js.es6
Other trouble commits
-
7cefaea8going to https://gitlab.com/gitlab-org/gitlab-ce/blob/7cefaea876da9e25a1c3ea870f4e4b070a196905/app/assets/javascripts/lib/utils/notify.js -
3ea3a6a1going to https://gitlab.com/gitlab-org/gitlab-ce/blob/3ea3a6a152c88325ca2fd1161a27b4a9e2d5ce51/CHANGELOG.md
What is the current bug behavior?
"Browse file" can direct you to an unrelated file.
What is the expected correct behavior?
"Browse File" should direct you to the specific file for which you are viewing commit history for at the commits point in time (and follow necessary renames).
Output of checks
This bug happens on GitLab.com
References
Edited by Eric Eastwood