Skip to content

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

Originally opened at !4816 (closed) by @stanhu.


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: The "before" image may not actually be the image you want to compare against (regression of #14327 (closed)) 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.

What are the relevant issue numbers?

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

Merge request reports