[PR #4109] fix: UI Freezes for a few minutes if repo has binary files #10871

Closed
opened 2026-02-16 18:15:37 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/4109

State: closed
Merged: Yes


closes #4084

From docs
https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---numstat

--numstat
... . For binary files, outputs two - instead of saying 0 0.

PS:
It would be good to add a warning if sum(result[i].before.length + result[i].after.length) > WARNIG_DIFF_SIZE in that case it will be easier to find this issue next time if it occurs because of csv/tsv/nonbinary format.

Measuring time of diffFull with warning also is not that bad idea.

Probably it will be enough for some time without switching this to be lazy.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4109 **State:** closed **Merged:** Yes --- closes #4084 From docs https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---numstat > **--numstat** > ... . For binary files, outputs two - instead of saying 0 0. PS: It would be good to add a warning if `sum(result[i].before.length + result[i].after.length) > WARNIG_DIFF_SIZE` in that case it will be easier to find this issue next time if it occurs because of csv/tsv/nonbinary format. Measuring time of diffFull with warning also is not that bad idea. Probably it will be enough for some time without switching this to be lazy.
yindo added the pull-request label 2026-02-16 18:15:37 -05:00
yindo closed this issue 2026-02-16 18:15:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10871