The output of git diff
is optimized for code which tends to be one statement per line whereas text can (if authors like me are too lazy to use line breaks) cause diff output which is very hard to read and more of a "Where's Wally?" search than reading diff output
whereas highlighting as done on GitLab's or GitHub's web frontend shows the difference immediately
I'm aware that I'm comparing HTML and plain text (apples and oranges), however it should be possible to improve the git diff
output by using different colors or adding marker characters around a change (JUnit uses []
around insertions which isn't great to read, but an example for what I mean) and it would be the first time that there's something I expect to be somewhere available in git that actually was not.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…