Merge Requests can have a commit as source branch
Summary
Merge Requests can be created with a commit as their source branch
Steps to reproduce
- Create a commit
- Copy the SHA
- Visit
<instance>/<project>/-/merge_requests/new?merge_request[source_branch]=<commit sha>
- Create the MR
Example Project
What is the current bug behavior?
The MR is created with the commit as source branch and shows no changes.
What is the expected correct behavior?
The MR can only be created with a branch as source branch
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)