snippits cannot be edited if created when semantic branch names are used as global default
Summary
After setting default branch name to a semantic version name 0.0.x snippits can no longer be edited.
Steps to reproduce
- visit
/admin/application_settings/repository - change the default branch name to
0.0.x - create a snippit with a file
- edit the newly created snippit
-
Notice the error message saying "Can't fetch content for the blob: Error: Request failed with status code 404"
This can also be verified by the network tab on the browser. For example if the name of the file in the snippit is
testand the snippit number is 71 then theGETrequest for the snippit returns a 404 status for the url/-/snippets/71/raw/0.0.x/testThis happens if the snippit is set to any visibility.
-
Example Project
Not applicable.
What is the current bug behavior?
The snippit edit page shows a message saying "Can't fetch content for the blob: Error: Request failed with status code 404"
What is the expected correct behavior?
The snippit edit page shows the snippit ready for editing.
Relevant logs and/or screenshots
Results of GitLab environment info
Your GitLab Version
(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`)
Possible fixes
Edited by 🤖 GitLab Bot 🤖
