Skip to content

Push Options does not create MR from master to other branch

Potential workaround

Summary

When running push with options to master branch, merge requests to other branch is not created.

Steps to reproduce

  1. Take any repository with master and other branches.
  2. Switch to master.
  3. Make any changes and commit them.
  4. Run git push -o merge_request.create -o merge_request.target=other

Example Project

Any project will do.

What is the current bug behavior?

Push is performed but no merge request master -> other is created afterwards.

What is the expected correct behavior?

Push is performed AND merge request master -> other is created afterwards.

Relevant logs and/or screenshots

* master
  other
  remotes/origin/master
  remotes/origin/other
PS D:\Desktop\lst_test2> git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   README.md

no changes added to commit (use "git add" and/or "git commit -a")
PS D:\Desktop\lst_test2> git add .
PS D:\Desktop\lst_test2> git commit -m "Update readme"
[master f921287] Update readme
 1 file changed, 1 insertion(+), 1 deletion(-)
PS D:\Desktop\lst_test2> git push -o merge_request.create -o merge_request.target=other
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Writing objects: 100% (3/3), 280 bytes | 280.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://gitlab.com/lodzsolarteam/lst_test2.git
   eaef702..f921287  master -> master
PS D:\Desktop\lst_test2>

Output of checks

This bug happens on GitLab.com

Automatic creation of MR from other to master works without any problems. It works between two non-master branches as well.

Edited by Jay McCure