Update binary diff description
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
What
Update a description on the diffs page.
Before: File suppressed by a .gitattributes entry or the file's encoding is unsupported.
After: File suppressed by a .gitattributes entry, the file's encoding is unsupported, or the file size exceeds the limit.
Why
On Gitlab, to save performance, we will treat text files larger than 50MB
as binary files.
This has caused confusion for the customers of JiHu Gitlab, because the description displayed on the page does not match the actual situation - the users have not configured .gitattributes
, and the file encoding format is the most common UTF-8
.

Is there a better solution?
I think it's very difficult. We need to modify the code of Gitaly to more accurately distinguish large text files from real binary files, and then convey this information to GitLab Rails... This sounds like a much larger workload. it would be more cost-effective to directly update a piece of text.
References
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
Just upload a text file larger than 50MB
in the MR. Or you can directly visit my public project: test-mirror-ui/project3!1 (diffs)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
JiHu issue: https://jihulab.com/jihulab/jh-infra/teamwork/-/issues/1207