Unable to view diff of files below file that is too large to show the diff
Unable to view diff of files below file that is too large to show the diff, "This source diff could not be displayed because it is too large. You can view the blob instead."
Example: https://gitlab.com/gitlab-org/gitter/halley/merge_requests/7/diffs
Clicking on the header of the file reveals "This diff is collapsed. Click to expand it." but clicking just collapes it again. The files have lots of content(not empty) and diff changes.
This may be backend as I don't see the .diff-content in the /gitter/halley/merge_requests/7/diffs.json response but we should better handle the situation on the frontend in any case (show error if there is actually a problem loading the diff).
-
✔ Tested and confirmed this is working in %10.8 -
❌ Tested and is failing on GitLab.com running %11.0 -
❌ Tested and it is failing on up-to-date local EE GDK (my local MR). It has slightly different behavior where it has a loading spinner when you click to expand but same result. -
❌ Tested and it is failing on up-to-date local CE GDK (my local MR). It has slightly different behavior where it has a loading spinner when you click to expand but same result.
Some Slack discussion here, https://gitlab.slack.com/archives/C0GQHHPGW/p1530020323000556
Workaround
As found by @khartahk, https://gitlab.com/gitlab-org/gitlab-ce/issues/48451#note_84253090
- Click Hide whitespace changes at the top of the Changes tab which adds
?w=1to the URL - Click to expand or clicking on the header shows the diff
🎉
cc @fatihacet
