Search from a commit detail does not use commit SHA as repository_ref
The search in navbar adapts to current context. When browsing through the files of a specific branch, or viewing a file in a specific version, the current version is used as
repository_ref in the search. Yet, when viewing a commit page, the search bar searches only the master branch.
Steps to reproduce
- Create a new branch
- Commit a new file with a word that appears nowhere else in your codebase
- Go to the detail page of your commit, enter the word you added in the search bar and hit search => no result
- Go to the Files view, switch to the new branch, enter the word you added in the search bar and hit search => the file is found
=> Looking for
perspiciatis doesn't return any result. But going to the files view and searching
What is the current bug behavior?
The generated Search URL has an empty
What is the expected correct behavior?
When visiting a commit detail page,
repository_ref should be set to the commits sha, similar to when a single file is being viewed:
Output of checks
This bug happens on GitLab.com