Not possible to remove previously merged commits from an MR

Summary

When reviewing !27709 (closed) (!27709 (comment 515514963)) we encountered this bug, which was probably introduced in !27402 (merged).

When attempting to remove previously merged commits from an MR, it throws this error:

CleanShot_20210223184559

Steps to reproduce

  1. Create a merge request or go to an existing one.
  2. In the Commits tab, click “Add previously merged commits”.
  3. Select a few commits and save.
  4. Click “Add/remove” to show the modal again.
  5. De-select one or more selected commits and save.

What is the current bug behavior?

It's not possible to remove previously merged commits from an MR.

What is the expected correct behavior?

It should be possible to remove previously merged commits from an MR.

Edited by Pedro Moreira da Silva