Bug #5629


Diff truncated on small files

Added by Olivier Renaud almost 4 years ago. Updated almost 4 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Commit Number:
Affected Version:


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.


banner1.png (42.3 KB) banner1.png Olivier Renaud, 10.07.2020 19:19
banner2.png (184 KB) banner2.png Olivier Renaud, 10.07.2020 19:20
Actions #1

Updated by Daniel D almost 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
Actions #2

Updated by Olivier Renaud almost 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.

Actions #3

Updated by Daniel D almost 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.


Also available in: Atom PDF