Bug #5629
openDiff truncated on small files
0%
Description
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.
Files
Updated by Daniel D about 4 years ago
Hi Oliver,
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 about 4 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.
Updated by Daniel D about 4 years ago
The Global limit is due to hwo diffs are processed, we generate a single diff for changes for multiple files. We'll try to check if it's possible to split it per-file to optimize UX.