Problem is well described at https://lists.zx2c4.com/pipermail/cgit/2022-May/004720.html
Effectively cgit output for bigger files is truncated at ~65kB. Applying attached patch (see link) addresses the issue.
Steps to Reproduce:
1. Configure cgit and add a bigger file to the repository (35kB+ in my case)
2. Try to display content of that file using cgit
Webpage gets truncated
Full webpage gets displayed
Created attachment 794549 [details, diff]
Please, can this patch finally be applied in the official ebuild?