Merge commit from main to branch is not shown on merge request window

Summary

  1. Create

Steps to reproduce

  1. Create branch and change file -> start merge request

  2. change file on main branch

  3. on merge request you have conflict to merge with main - it can be resolved by online editor

  4. resolving conflict with online editor ends with commit merge request

  5. this merge request is visible on branch - last commit https://gitlab.com/przemek.kieszkowski/branch-error/-/commits/not-shown-merged-commit "Merge branch 'main' into 'not-shown-merged-commit'

  6. It is not visible on merge request list of commits przemek.kieszkowski/branch-error!2

  7. As conflict was solved it is not possible to merge code to main branch

Workaround for this is just to make empty commit on branch

Example Project

https://gitlab.com/przemek.kieszkowski/branch-error/-/commits/not-shown-merged-commit

What is the current bug behavior?

What is the expected correct behavior?

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)

Possible fixes

Edited by Przemysław Kieszkowski