Code link in the search result should use default branch name instead of commit hash

I tried to find a file today using Global Search, and was successful.

I searched for the string canonical_path: "/releases/gitlab-com/" in the gitlab-com namespace, and it came back with one result. When I click on a line number of the file, it 500's.

The URL it sends me to is: https://gitlab.com/gitlab-com/www-gitlab-com/-/blob/231be75a30fc0ecb667fbd161b7bf39caac7d364/sites/marketing/source/releases/gitlab-com/template.html.haml

If I browse to this same file normally through the repo browser, it loads normally via the link: https://gitlab.com/gitlab-com/www-gitlab-com/-/blob/master/sites/marketing/source/releases/gitlab-com/template.html.haml

Why is global search returning links to specific commit hashes? (If that is what it is?)

Edited by Changzheng Liu