Skip to content

Merge request with 10,000 files won't load diff tab

Summary

When a large number of files is changed, the merge request diff tab won't load at all.

Steps to reproduce

  1. Create a new repository
  2. Create a new branch
  3. Add lots of files: for i in {00000..10000}; do; echo "Lorem ipsum" > "file-${i}.txt"; done
  4. Commit the new files and open a merge request
  5. Merge request loads, but diff tab won't open

Example Project

Example: https://gitlab.com/jramsay/diff-test/merge_requests/5/diffs

What is the current bug behavior?

Entire diff tab fails to load

What is the expected correct behavior?

  • File tree should show the first 1,000 files
  • Diff list should include the first 1,000 diffs

Relevant logs and/or screenshots

20181102_screenshot_1

Output of checks

This bug happens on GitLab.com

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)