summaryrefslogtreecommitdiff
path: root/changelogs
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-01-03 14:18:13 +0000
committerSean McGivern <sean@gitlab.com>2018-01-04 14:33:12 +0000
commit528b5eeb761f627bb1972fa8a25a09dc1cea4556 (patch)
tree4b32a5e10e331b252599fdad40e44996ab5e5421 /changelogs
parente5a9b9a14d32d890dea20403c977dfd569eb3e17 (diff)
downloadgitlab-ce-528b5eeb761f627bb1972fa8a25a09dc1cea4556.tar.gz
Old merge requests can have diffs without corresponding blobs. (This also may be possible for commit diffs in corrupt repositories.) We can't use the `&.` operator on the blobs, because the blob objects are never nil, but `BatchLoader` instances that delegate to `Blob`. We can't use `Object#try`, because `Blob` doesn't inherit from `Object`. `BatchLoader` provides a `__sync` method that returns the delegated object, but using `itself` also works because it's forwarded, and will work for non-`BatchLoader` instances too. So the simplest solution is to just use that with the `&.` operator.
Diffstat (limited to 'changelogs')
-rw-r--r--changelogs/unreleased/41468-error-500-trying-to-view-a-merge-request-json-undefined-method-binary-for-nil-nilclass.yml5
1 files changed, 5 insertions, 0 deletions
diff --git a/changelogs/unreleased/41468-error-500-trying-to-view-a-merge-request-json-undefined-method-binary-for-nil-nilclass.yml b/changelogs/unreleased/41468-error-500-trying-to-view-a-merge-request-json-undefined-method-binary-for-nil-nilclass.yml
new file mode 100644
index 00000000000..f69116382f0
--- /dev/null
+++ b/changelogs/unreleased/41468-error-500-trying-to-view-a-merge-request-json-undefined-method-binary-for-nil-nilclass.yml
@@ -0,0 +1,5 @@
+---
+title: Fix viewing merge request diffs where the underlying blobs are unavailable
+merge_request:
+author:
+type: fixed