Commit email notifications don't contain a diff for large files
Summary
Commit email notifications don't contain a diff for small changes to large files
Steps to reproduce
- Have a repository with a very large (e.g. 15MB) plain text file
- Subscribe to push email notifications
- Make a small change, e.g. a one line change
- Receive a push notification email
- The email contains something like: "No preview for this file type"
Example Project
https://gitlab.com/pochu/security-tracker
Affected file: https://gitlab.com/pochu/security-tracker/blob/master/data/CVE/list
Example commit: https://gitlab.com/pochu/security-tracker/commit/e2f209f8a0e67e70e5e71646b4ffb550aae7c728
Note that this commit shows a diff on the web, so I would expect an email notification to contain a diff as well
What is the current bug behavior?
Email notifications contain:
1 changed file:
data/CVE/list
Changes: data/CVE/list No preview for this file type
What is the expected correct behavior?
A code diff should be shown, just like on the web
Relevant logs and/or screenshots
See email Message-ID: 5a6af40f37359_15d2c3fe935fd84b016286389@sidekiq-asap-03.mail
Output of checks
This bug happens on GitLab.com
