gitlab-org--gitlab-foss/lib
Douwe Maan fdd7e3f6e9 Merge branch 'stanhu/gitlab-ce-fix-error-500-with-mr-images' into 'master'
Fix Error 500 when creating a merge request that contains an image that was deleted and added

_Originally opened at !4816 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)
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, gitlab-org/gitlab-ee#678

See merge request !7457
2016-11-15 10:22:36 +00:00
..
api Use declared_params helper in API 2016-11-14 15:22:06 +01:00
assets
backup
banzai Merge branch 'markdown-xss-fix-option-2.1' into 'security' 2016-11-09 12:26:44 +01:00
ci Improve naming convention in ci configuration module 2016-11-14 10:31:45 +01:00
constraints Add small improvements to constrainers and specs 2016-11-08 14:32:42 +02:00
container_registry
generators/rails/post_deployment_migration require rails/generators for generators 2016-11-01 21:44:27 +01:00
gitlab Merge branch 'stanhu/gitlab-ce-fix-error-500-with-mr-images' into 'master' 2016-11-15 10:22:36 +00:00
json_web_token
omni_auth
rouge/formatters
support
tasks Improve EeCompatCheck, cache EE repo and keep artifacts for the ee_compat_check task 2016-11-10 10:40:47 +01:00
banzai.rb
disable_email_interceptor.rb
event_filter.rb
expand_variables.rb
extracts_path.rb Remove 'extended_sha1' option from ExtractsPath module 2016-11-06 12:33:39 +09:00
file_size_validator.rb
file_streamer.rb
gitlab.rb
gt_one_coercion.rb
repository_cache.rb
static_model.rb
unfold_form.rb
uploaded_file.rb
version_check.rb