Unable to load commit data on branch where the branch name contains a hash
Summary
When browsing to a branch in GitLab where the branch name contains a # character and error is displayed at the top of the page stating
An error occurred while fetching commit data.
The commit data usually displayed on the repository view also never loads:
Steps to reproduce
- in any project edit a file in the WebIDE
- click on
Create Commit
, selectCreate a new branch
and enter a new branch name containing a hash (for exampletest-#-1
) - if
Start a new merge request
is selected the following error will be shown after clickingCommit
: - if
Start a new merge request
is not selected the view stays on the Web IDE editor - browse to
Repository > Branches
and click on the branch created by the above commit which contains the # character - the above error about the commit data will be displayed
Example Project
I have reproduced this on https://gitlab.com/gitlab-gold/ahergenhan/ci-test-project
What is the current bug behavior?
Any branches that contain # in their names cannot load the commit data.
What is the expected correct behavior?
The commit data should load regardless of the characters used in the branch name
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)