when creating and accepting a merge request from master to a development branch, the development branch is merged in master too

Summary

We have observed an issue that when we have a merge request to merge master into a development branch (we don't want to rebase) the development branch is merged in master too, which we do not want.

(Summarize the bug encountered concisely)

Steps to reproduce

Create a new branch from master Commit something on the new branch Propose to merge the master branch in the new branch Accept the merge request

Example Project

What is the current bug behavior?

The master branch is merged into the development branch The development branch is merged into master too

What is the expected correct behavior?

The master branch is merged into the development branch The master branch remains unchanged

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

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)

System:		CentOS 7.5.1804
Current User:	git
Using RVM:	no
Ruby Version:	2.5.3p105
Gem Version:	2.7.6
Bundler Version:1.17.3
Rake Version:	12.3.2
Redis Version:	3.2.12
Git Version:	2.18.1
Sidekiq Version:5.2.5
Go Version:	unknown

GitLab information
Version:	11.10.1
Revision:	861fe405571
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	PostgreSQL
DB Version:	9.6.11
URL:		https://redacted
HTTP Clone URL:	https://redacted.com/some-group/some-project.git
SSH Clone URL:	git@mredacted.com:some-group/some-project.git
Using LDAP:	yes
Using Omniauth:	yes
Omniauth Providers:

GitLab Shell
Version:	9.0.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
GitLab Shell path:		/opt/gitlab/embedded/service/gitlab-shell
Git:		/opt/gitlab/embedded/bin/git

(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)

Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 9.0.0 ? ... OK (9.0.0)
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... Server: ldapmain
LDAP authentication... Success
LDAP users with access to your GitLab server (only showing the first 100 results)
redacted

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ...
1/1 ... yes
1/2 ... yes
1/3 ... yes
3/4 ... yes
4/5 ... yes
4/6 ... yes
4/7 ... yes
3/8 ... yes
3/9 ... yes
4/10 ... yes
4/11 ... yes
4/12 ... yes
3/13 ... yes
3/14 ... yes
7/15 ... yes
4/16 ... yes
3/17 ... yes
7/18 ... yes
4/19 ... yes
3/20 ... yes
10/21 ... yes
3/22 ... yes
2/23 ... yes
5/24 ... yes
5/25 ... yes
3/26 ... yes
3/27 ... yes
3/29 ... yes
3/30 ... yes
15/32 ... yes
3/33 ... yes
16/36 ... yes
3/37 ... yes
3/38 ... yes
3/39 ... yes
3/40 ... yes
3/41 ... yes
3/42 ... yes
3/43 ... yes
3/45 ... yes
3/46 ... yes
3/47 ... yes
3/48 ... yes
3/49 ... yes
3/50 ... yes
3/52 ... yes
3/53 ... yes
16/54 ... yes
3/55 ... yes
3/56 ... yes
10/57 ... yes
3/58 ... yes
3/59 ... yes
4/60 ... yes
3/61 ... yes
4/62 ... yes
16/63 ... yes
3/64 ... yes
16/65 ... yes
3/66 ... yes
3/67 ... yes
3/68 ... yes
3/69 ... yes
6/70 ... yes
3/72 ... yes
3/73 ... yes
4/75 ... yes
4/76 ... yes
19/77 ... yes
3/78 ... yes
19/79 ... yes
3/81 ... yes
3/82 ... yes
3/83 ... yes
10/84 ... yes
15/85 ... yes
3/86 ... yes
4/87 ... yes
3/89 ... yes
16/90 ... yes
3/91 ... yes
3/92 ... yes
16/93 ... yes
16/94 ... yes
3/96 ... yes
4/101 ... yes
4/102 ... yes
3/103 ... yes
3/104 ... yes
3/105 ... yes
4/106 ... yes
4/107 ... yes
16/108 ... yes
16/109 ... yes
2/110 ... yes
28/111 ... yes
4/112 ... yes
4/113 ... yes
125/114 ... yes
3/115 ... yes
4/116 ... yes
3/117 ... yes
4/119 ... yes
4/121 ... yes
4/122 ... yes
3/123 ... yes
3/124 ... yes
53/125 ... yes
6/126 ... yes
58/128 ... yes
58/129 ... yes
58/132 ... yes
4/133 ... yes
4/135 ... yes
3/136 ... yes
4/137 ... yes
4/139 ... yes
4/140 ... yes
54/141 ... yes
59/142 ... yes
4/143 ... yes
4/144 ... yes
4/146 ... yes
62/147 ... yes
108/149 ... yes
106/150 ... yes
119/151 ... yes
119/152 ... yes
125/153 ... yes
3/154 ... yes
3/155 ... yes
11/157 ... yes
91/158 ... yes
91/159 ... yes
108/160 ... yes
61/161 ... yes
16/162 ... yes
61/163 ... yes
61/164 ... yes
58/165 ... yes
4/166 ... yes
4/167 ... yes
148/169 ... yes
148/170 ... yes
3/173 ... yes
161/174 ... yes
161/175 ... yes
191/176 ... yes
148/177 ... yes
148/178 ... yes
169/179 ... yes
4/180 ... yes
4/181 ... yes
4/182 ... yes
3/183 ... yes
3/184 ... yes
3/185 ... yes
3/186 ... yes
3/187 ... yes
3/188 ... yes
19/189 ... yes
106/190 ... yes
179/192 ... yes
179/193 ... yes
3/194 ... yes
178/195 ... yes
178/196 ... yes
178/197 ... yes
182/198 ... yes
182/199 ... yes
182/201 ... yes
3/202 ... yes
182/203 ... yes
177/204 ... yes
177/205 ... yes
16/206 ... yes
3/208 ... yes
265/209 ... yes
7/210 ... yes
51/211 ... yes
22/212 ... yes
4/213 ... yes
3/214 ... yes
177/215 ... yes
19/216 ... yes
61/217 ... yes
148/218 ... yes
3/220 ... yes
265/222 ... yes
182/224 ... yes
3/225 ... yes
182/226 ... yes
178/227 ... yes
202/229 ... yes
265/230 ... yes
26/232 ... yes
26/233 ... yes
178/236 ... yes
178/237 ... yes
182/238 ... yes
265/239 ... yes
4/240 ... yes
3/241 ... yes
182/242 ... yes
204/245 ... yes
3/247 ... yes
205/248 ... yes
265/250 ... yes
10/251 ... yes
208/252 ... yes
208/253 ... yes
208/254 ... yes
208/255 ... yes
208/256 ... yes
208/257 ... yes
208/258 ... yes
22/259 ... yes
208/260 ... yes
210/261 ... yes
19/262 ... yes
182/263 ... yes
211/264 ... yes
211/265 ... yes
211/266 ... yes
3/267 ... yes
216/268 ... yes
2/270 ... yes
182/271 ... yes
226/272 ... yes
3/273 ... yes
208/274 ... yes
183/275 ... yes
3/276 ... yes
201/277 ... yes
19/278 ... yes
19/279 ... yes
63/280 ... yes
236/282 ... yes
208/283 ... yes
87/284 ... yes
243/285 ... yes
243/286 ... yes
177/287 ... yes
63/288 ... yes
4/290 ... yes
2/291 ... yes
208/292 ... yes
63/293 ... yes
121/294 ... yes
63/295 ... yes
243/300 ... yes
182/301 ... yes
63/302 ... yes
243/304 ... yes
182/306 ... yes
8/307 ... yes
261/310 ... yes
250/311 ... yes
182/312 ... yes
182/313 ... yes
182/314 ... yes
182/316 ... yes
243/317 ... yes
267/318 ... yes
4/320 ... yes
63/322 ... yes
249/323 ... yes
4/324 ... yes
4/325 ... yes
4/326 ... yes
182/327 ... yes
182/328 ... yes
63/329 ... yes
63/331 ... yes
149/332 ... yes
63/333 ... yes
182/334 ... yes
267/335 ... yes
267/336 ... yes
267/338 ... yes
241/340 ... yes
241/341 ... yes
241/342 ... yes
241/343 ... yes
241/344 ... yes
241/345 ... yes
241/346 ... yes
241/347 ... yes
241/348 ... yes
241/349 ... yes
243/350 ... yes
63/351 ... yes
63/353 ... yes
243/355 ... yes
267/356 ... yes
3/357 ... yes
3/358 ... yes
63/359 ... yes
63/360 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.5.3 ? ... yes (2.5.3)
Git version >= 2.18.0 ? ... yes (2.18.1)
Git user has default SSH configuration? ... yes
Active users: ... 236

Checking GitLab App ... Finished


Checking GitLab subtasks ... Finished

```
(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)

</pre>
</details>

### Possible fixes


/label ~bug
Edited by Mihai Cristian Satmarean