gitlab-org--gitlab-foss/lib/gitlab
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
..
auth Move logic to check ci? or lfs_deploy_token? to Gitlab::Auth::Result 2016-09-20 11:03:10 +02:00
backend Refine Git garbage collection 2016-11-04 14:30:11 +01:00
badge Fix tests 2016-08-26 15:40:12 +08:00
bitbucket_import Rename gl_user_id to gitlab_user_id in importer classes 2016-09-08 11:57:22 +10:00
checks Avoid protected branches checks when verifying access without branch name 2016-09-13 11:50:13 +02:00
ci Fix indentation in CI variables entry class 2016-11-14 11:46:41 +01:00
conflict Add blob_ace_mode to conflict content response 2016-10-13 14:16:35 -05:00
data_builder Fix lightweight tags not processed correctly by GitTagPushService 2016-10-28 13:53:18 -03:00
database Implement fourth round of comments from @DouweM. 2016-09-21 09:57:14 +05:30
diff Fix Error 500 when creating a merge request that contains an image that was deleted and added 2016-11-14 15:57:01 +01:00
downtime_check Better formatting for downtime check messages 2016-08-17 12:15:20 +02:00
email implements reset incoming email token on issues modal and account page, 2016-11-07 15:56:18 +00:00
fogbugz_import Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
gfm Keep cross project reference logic in GroupLabel#to_reference 2016-10-19 14:58:26 -02:00
git Clean environment variables when running git hooks 2016-09-15 08:51:55 +03:00
github_import Cache imported GH labels no matter what 2016-11-04 15:59:53 +02:00
gitlab_import Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2016-09-08 17:43:19 +03:00
google_code_import Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
graphs
import_export Merge branch 'fix/import-export-symlink-vulnerability' into 'security' 2016-11-03 16:04:18 +01:00
ldap Centralize LDAP config/filter logic 2016-11-11 15:58:33 -06:00
markdown
metrics Adds response mime type to transaction metric action when it's not HTML 2016-08-25 16:33:41 +02:00
middleware Fix typo in gitlab-workhorse header 2016-08-19 12:25:52 +02:00
o_auth Omniauth auto link LDAP user falls back to find by DN when user cannot be found by uid 2016-11-10 15:47:40 -06:00
request_profiler
saml
sanitizers
sherlock
sidekiq_middleware Merge branch 'aiionx_sidekiq_log_patch' into 'master' 2016-10-03 14:20:18 +00:00
slash_commands Fix behavior around commands with optional arguments 2016-08-18 14:29:49 -05:00
sql
template Load issues and merge requests templates from repository 2016-08-16 15:50:17 -03:00
access.rb Allow Member.add_user to handle access requesters 2016-09-28 09:43:00 +02:00
app_logger.rb
asciidoc.rb
auth.rb Handle LFS token creation and retrieval in the same method, and in the same Redis connection. 2016-09-28 12:13:48 -05:00
award_emoji.rb
bitbucket_import.rb
blame.rb
changes_list.rb
closing_issue_extractor.rb
color_schemes.rb
config_helper.rb
contributions_calendar.rb Merge branch '23403-fix-events-for-private-project-features' into 'security' 2016-11-09 12:27:41 +01:00
contributor.rb
current_settings.rb Only turn on Sidekiq throttling if application settings exists 2016-11-12 16:00:21 -08:00
database.rb
devise_failure.rb
downtime_check.rb
ee_compat_check.rb Improve EeCompatCheck, cache EE repo and keep artifacts for the ee_compat_check task 2016-11-10 10:40:47 +01:00
emoji.rb Convert UTF-8 Emoji to Gitlab emoji 2016-10-13 13:18:30 +02:00
environment_logger.rb Show log corresponding to env in admin/logs 2016-11-03 22:02:47 +01:00
exclusive_lease.rb Refine Git garbage collection 2016-11-04 14:30:11 +01:00
git.rb Add spec covering 'committer_hash' 2016-09-20 10:15:43 -07:00
git_access.rb Merge branch 'fix-unathorized-cloning' into 'security' 2016-11-09 12:27:17 +01:00
git_access_status.rb
git_access_wiki.rb
git_logger.rb
git_post_receive.rb
git_ref_validator.rb
gl_id.rb
gon_helper.rb Stop putting private tokens in Gon 2016-09-19 12:27:37 +01:00
highlight.rb
identifier.rb Refactor Gitlab::Identifier 2016-10-05 12:40:17 +02:00
import_export.rb Fix import/export labels to cope with project and group labels. Added relevant specs. 2016-10-19 14:58:25 -02:00
import_formatter.rb
import_sources.rb Remove gitorious 2016-08-25 10:10:10 +01:00
incoming_email.rb implements reset incoming email token on issues modal and account page, 2016-11-07 15:56:18 +00:00
issues_labels.rb Pass user instance to Labels::FindOrCreateService or skip_authorization: true 2016-10-28 11:31:45 +02:00
key_fingerprint.rb
lazy.rb
lfs_token.rb Fix race condition that can be triggered if the token expires right after we retrieve it, but before we can set the new expiry time. 2016-09-29 10:25:26 -05:00
logger.rb
mail_room.rb Updated mail_room and added sentinel support to Reply by Email 2016-10-26 05:02:47 +02:00
markup_helper.rb
metrics.rb Tracking of custom events 2016-08-17 10:04:04 +02:00
optimistic_locking.rb Make retry_lock to not be infinite 2016-10-27 12:34:35 +01:00
other_markup.rb
popen.rb Fix Gitlab::Popen.popen thread-safety issue 2016-09-13 21:39:46 +02:00
project_search_results.rb Faster search 2016-11-08 14:21:19 +02:00
protocol_access.rb
recaptcha.rb
redis.rb Updated mail_room and added sentinel support to Reply by Email 2016-10-26 05:02:47 +02:00
reference_extractor.rb
regex.rb Added ability to put emojis into repository name 2016-11-12 09:21:23 +01:00
repository_check_logger.rb
request_profiler.rb
routing.rb
search_results.rb Clean up search result classes 2016-09-06 10:12:55 +03:00
seeder.rb
sentry.rb Fix Sentry not reporting right program for Sidekiq workers 2016-08-25 19:42:52 -07:00
sherlock.rb
sidekiq_logger.rb
sidekiq_throttler.rb Refactored Sidekiq Throttler and updated documentation 2016-11-11 11:14:58 -06:00
snippet_search_results.rb Clean up search result classes 2016-09-06 10:12:55 +03:00
themes.rb
timeless.rb
upgrader.rb
uploads_transfer.rb
url_builder.rb url_builder: handle project snippets 2016-08-24 10:32:12 -04:00
url_sanitizer.rb
user_access.rb Improve EE compatibility with protected branch access levels. 2016-08-16 12:08:10 +05:30
utils.rb Fix project features default values 2016-11-01 11:03:56 -02:00
version_info.rb
visibility_level.rb
workhorse.rb Explain the extra chmod 2016-09-26 14:21:39 +02:00