Uploading a new file from Web UI can push to "undefined" branch
While trying to fix https://gitlab.com/gitlab-org/gitlab-ce/issues/45350#note_68536487, I noticed that the branch used by the Web UI may be undefined
when a fork is automatically created. Steps to reproduce:
- Make a project "Public"
- Ensure user
testme
doesn't have any permissions for that group - Go to project repository view, click "+", "Upload file"
- Project will be forked automatically. Repeat step 3.
- The dropdown won't have a "branch" name, so you don't see the usual branch name:
Notice the branch is undefined
:
I think it should be a frontend change that shows the branch name if the user doesn't have access to push directly to the public repository.