Commit redirects to MR form when "Create a merge request for this change" isn't selected
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "type::bug" label: - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=type::bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary Commits from the UI for changes originating from a protected branch a user does not have push permissions to redirects to a new MR page. This occurs even when "Create a merge request for this change" is not selected. ### Steps to reproduce 1. In a project, under **Settings \> Repository \> Protected Branches** edit the rules for a branch to not allow users to push and merge. 2. From the protected branch, edit a file. 3. Commit the changes. In the window, deselect "Create a merge request for this change". Note: in the window, a new branch will be created since the user does not have permission to push to the branch. 4. Result: User is redirect to the page to create a new MR. Cancelling out of the MR redirects to the repository where the branch / commit exist. This does not happen while editing from the IDE. ### Example Project https://gitlab.com/irisb_ultimate_group/work/tickets/600820/project-a ### What is the current _bug_ behavior? User is redirected to create a new merge request despite de-selecting "Create a merge request for this change" ### What is the expected _correct_ behavior? Changes are committed to a new branch without being redirected to create a merge request. ### Output of checks <!--If you are reporting a bug on GitLab.com, uncomment below--> This bug happens on GitLab.com <!--or follow up with an issue comment of `@gitlab-bot label ~"reproduced on GitLab.com"` if you do not--> <!--If you don't have /label privileges, follow up with an issue comment of `@gitlab-bot label ~"type::bug"`-->
issue