在“git diff”中显示的差异之前,是否可以对文件应用某些过滤器,例如“fmt -w 80”?因此,当我想看到差异时,线条会自动断开。
以下是通过fmt -w 20
的示例。
原始文件
This is a very very very long line.
修改过的文件
This is a very very very very long line.
定期结果:
-This is a very very very long line.
+This is a very very very very long line.
通过过滤器后:
This is a very very
-very long line.
+very very long line.
P.S。我知道git diff --color-words
可以显示单词的不同,但我只想逐行看到它。