Skip to content

"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

  1. Visit https://gitlab.com/gitlab-org/gitlab-ce/commits/f6624b5ce433b7148287e898f164476608868433/app/assets/javascripts/merge_request_tabs.js.es6
  2. Click "Browse File" on the aaa9509d commit
  3. 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

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