Fix showing indentation changes in interdiffs.

Review Request #12068 — Created Feb. 20, 2022 and submitted

Information

Review Board
release-4.0.x

Reviewers

When viewing an interdiff, indentation changes wouldn't show up. If the
only changes made to a file were indentation-related, the file would
display only the last few lines of context, along with a banner stating
"This file contains only whitespace changes."

This was due to a strict check against an opcode tag of equal,
which should have allowed for filtered-equal as well.

We now check both, and split off new equal ranges for anything
containing indentation changes, ensuring they're highlighted. All other
filtered-equal ranges will remain.

Viewed an interdiff where nothing but indentation changes and trailing
whitespace had changed. Saw that those chunks were visible in the diff
viewer.

Summary ID
Fix showing indentation changes in interdiffs.
When viewing an interdiff, indentation changes wouldn't show up. If the only changes made to a file were indentation-related, the file would display only the last few lines of context, along with a banner stating "This file contains only whitespace changes." This was due to a strict check against an opcode tag of `equal`, which should have allowed for `filtered-equal` as well. We now check both, and split off new `equal` ranges for anything containing indentation changes, ensuring they're highlighted. All other `filtered-equal` ranges will remain.
e59f343b4f0a27dba119c0c9aeaf3885ebd60b52
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.0.x (1ce1c30)