Project search page doesn't honour branch fields, but the top nav search does
Summary
Using the search UI in /search
doesn't preserve your current reference/branch for searching. Unlike the 'This project' search bar in the top navigation.
This was brought up in a support issue: https://gitlab.zendesk.com/agent/tickets/83056
Steps to reproduce
- Navigate to a projects repository ie: https://gitlab.com/gitlab-org/gitlab-ce/tree/master
- Switch the repository browser to use a different branch.
- Use the search in the nav bar to search for code that only exists in that branch
- Then hit enter, or the search button from the search page to perform another search
What is the current bug behavior?
After hitting enter, the repository_ref is lost, and the search results are different
What is the expected correct behavior?
The repository_ref should be preserved in the search