Commit information cant be loaded for branches containing a hashtag
Summary
In the Webinterface, if you browse the files of a Project branch, that contains with a hashtag, you are prompted with the "An error occurred while fetching commit data." message and the rows Last committed
and Last updated
wont load.
Down patching from 15.6.1 to 15.5.0 made it work again, so the bug must have been introduced somewhere in between.
Steps to reproduce
create a new branch, containing a # and try browsing the files of this branch
Example Project
- https://gitlab.com/miggonaut/bugreport/-/tree/%23master
- https://gitlab.com/miggonaut/bugreport/-/tree/mas%23ter
- https://gitlab.com/miggonaut/bugreport/-/tree/master%23
What is the current bug behavior?
It appears to me that the branch name is lost while building the URL to request this information, resulting in a request to an URL like https://gitlab.com/miggonaut/bugreport/-/refs/?format=json&offset=0
instead of https://gitlab.com/miggonaut/bugreport/-/refs/%23master/logs_tree/?format=json&offset=0
which ultimately results in a 404 since the requested URL doesnt exist
What is the expected correct behavior?
The Last committed
and Last updated
rows should be loaded correctly :)
Output of checks
This bug happens on GitLab.com