Skip to content

Fix Error 500 when creating a merge request that contains an image that was deleted and added

Stan Hu requested to merge stanhu/gitlab-ce:fix-error-500-with-mr-images into master

What does this MR do?

This MR fixes an Error 500 when creating a merge request that contains an image that was deleted and added. Before, when displaying the before and after image, the code would always retrieve the image from the parent commit. However, in a diff, this could cause two different problems:

  1. The "before" image may not actually be the image you want to compare against (regression of gitlab-org/gitlab-ce#14327)
  2. It may appear as though a file was modified when it was really just added during the diff

Are there points in the code the reviewer needs to double check?

There may be a more elegant to fix this bug.

Why was this MR needed?

Because a number of users were unable to create merge requests

What are the relevant issue numbers?

#3893 (closed), gitlab-org/gitlab-ee#678

Does this MR meet the acceptance criteria?

Merge request reports

Loading