Branch with # in name fails to fetch commit data
### Summary
Occurs on gitlab.com and staging. Does not occur with GDK.
`https://gitlab.com/jay_mccure/test_hash/-/refs/test?format=json&offset=0` gives a 404 which seems to cause the problem, my gdk doesn’t seem to call the equivalent endpoint. My GDK calls the equivalent of https://gitlab.com/jay_mccure/test_hash/-/refs/test%23/logs_tree/?format=json&offset=0 which does seem to work

### Steps to reproduce
1. Go to https://gitlab.com/jay_mccure/test_hash/-/tree/test%23
### What is the current *bug* behavior?
`An error occurred while fetching commit data.`
Commit data not displayed
### What is the expected *correct* behavior?
Commit data loaded, no error
issue