mookid / diffr

Yet another diff highlighting tool
MIT License
575 stars 22 forks source link

Stop diffing when the diff input is too large. #96

Closed mookid closed 1 year ago

mookid commented 1 year ago

Adds a new flag --large-diff-threshold. When the diff input is larger than this value, the diff is hard to read in any case (even with the help of diffr). In that case, do less work and give up immediately on the diff computation; the diff is then displayed as "all removed, then all added" (every line starting with either '-' or '+' is highlighted).

The new behaviour can be turned off by passing 0 to --large-diff-threshold.

This is one of the issues of #14