Fix 500 error when visiting a commit where the blobs do not exist (nil blobs)
What does this MR do?
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3987
Fix 500 error when visiting a commit where the blobs do not exist (nil blobs)
Are there points in the code the reviewer needs to double check?
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16193 resolved the issues with a nil
blob not playing nice with the safe navigation operator new_blob&.external_storage_error? ----> undefined method 'external_storage_error?' for nil:NilClass
. See discussion https://gitlab.slack.com/archives/C02PF508L/p1515032270000250
Reproduction steps
- Import
https://gitlab.com/scmaps.net/starcraft_brood_war_maps_archive.git
a new project by git URL (this may take a while) - Visit http://localhost:3000/root/starcraft_brood_war_maps_archive/commit/6160b40e36a1db4760c185c369fceeb323dbf077A
- Notice how
__#__/(8)ber Paintball.scx
doesn't have a name available in the "1000 changed files" dropdown (easiest to search in dev tools to scroll into view)
Why was this MR needed?
scmaps.net/starcraft_brood_war_maps_archive@6160b40e throws a 500 because the old_blob
and new_blob
do not exist(not sure how to recreate this in the real-world).
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered
What are the relevant issue numbers?
Closes #41491 (closed)
Edited by Eric Eastwood