Diff truncated on small files
I have a PR with 177 file changes (additions, modifications and removals). It's mostly C++ python and XML files, but also a few binary files.
At the top of the PR, there is this message:
The problem is that for many source files, there is this message instead of the diff:
These are very reasonable file changes. One file for example is a 15 lines file with a single line addition.
Updated by Daniel D over 2 years ago
The current logic is that the diff is considered truncated with the above message if the sum of all changes exceed certain limit.
This is for performance reasons (browser performance).
The workaround would be to increase the diff cut-off limit, and only leave the individual large files limit. Also make sure you're on 4.19.X (if not already) we made an improvement in showing the limited diffs on that release too.
in rhodecode.ini set:
; Cut off limit for large diffs (size in bytes). If overall diff size on ; commit, or pull request exceeds this limit this diff will be displayed ; partially. E.g 512000 == 512Kb cut_off_limit_diff = 1024000 ; Cut off limit for large files inside diffs (size in bytes). Each individual ; file inside diff which exceeds this limit will be displayed partially. ; E.g 128000 == 128Kb cut_off_limit_file = 128000
Updated by Olivier Renaud over 2 years ago
Thank you. I will set a very big value for the global cutoff limit, and leave the per-file limit as is. In my opinion, the global limit does not make sense, as a single binary file change can break the diff view of small text file changes.