Commit 1ff0155
committed
fix(fs_write): suppress spurious trailing-newline diff lines
When the only difference between the old and new file content is a
trailing newline, similar::TextDiff produces a Delete/Insert pair for
the last line that clutters the diff output shown to the user.
Normalize both sides with trim_end_matches('\n') before diffing so
that a trailing-newline-only change is not shown as a modification.
Fixes #9231 parent e14ea18 commit 1ff0155
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
644 | | - | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
645 | 649 | | |
646 | 650 | | |
647 | 651 | | |
| |||
0 commit comments