Branch link returns 404 on merged branch, when "delete source branch" is enabled

From the MR page, if you click on the branch name after merging, the page returns a 404 error

See image Screenshot_2023-12-01_at_11.05.33

Steps to reproduce

  1. Create a branch
  2. Create a MR for said branch
  3. On the MR, mark the option "delete source branch"
  4. Merge the MR
  5. Wait for merge to succeed, and for the branch to be deleted
  6. Enter the MR again, and try clicking on the branch name

Expected result.

The branch name should not be clickable, or should redirect to a page explaining that the branch has been deleted

Actual result

I get a 404 error

Assignee Loading
Time tracking Loading