One-line diff suppressed for being a "large change"

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

In merge requests with large diffs, one-line changes can be suppressed for being "too large."

Steps to reproduce

  1. Create a MR with a large number of changes. In the MR I experienced the bug in, the diffstat is "395 files, + 34416, − 36" -- it commited a large amount of generated code. The commit must be structured such that the large changes precede smaller changes -- for example, add several hundred files into directory a, then make some small changes in directory b.
  2. View the changes in the MR, and scroll down to the small changes in b.
  3. Observe that small diffs, such as one-line changes, are collapsed with the message "Files with large changes are collapsed by default," although one-line changes are the smallest diff possible to create.
  4. Click "Expand changes" to see the full diff. Observe that a single line has been added to the bottom of a 40-line file.

What is the current bug behavior?

A one-line change to a small file is inaccurately treated as a "large change."

What is the expected correct behavior?

The small change should not be collapsed, or, the reason given for it being collapsed should be accurate.

Relevant logs and/or screenshots

Collapsed diff with +1,-0 diffstat, which adds a single line to the bottom of a 40-line .gitignore file.

image

Expanded diff confirming that the change is a oneliner.

image

Output of checks

This bug happens on GitLab.com

Edited by 🤖 GitLab Bot 🤖