mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-12-02 19:40:35 +08:00
Commits with large or many files, like a vendored driver with 3,790 files, OOM-killed httpd at its 2 GiB limit. radicle-surf diffs every file twice and its rename detection loads whole blobs, so its output can't be bounded, and httpd now builds the diff itself. Files over 1 MiB or 50,000 lines, or past the per-response budgets, aren't diffed and come back as binary with `"tooLarge": true`. Files after the first 3,000 are left out. The diff is then `"truncated"` and takes its stats from `git diff --numstat`. This also fixes files shrunk from over the limit showing up as empty. `git2` becomes a direct dependency, at the version `radicle` already uses, for the diff types `radicle::git::raw` doesn't re-export. Co-authored-by: Rūdolfs Ošiņš <rudolfs@osins.org>