how to make svn diff show only non-whitespace line changes between two revisions

umar picture umar · Nov 16, 2009 · Viewed 50.6k times · Source

I can get diffs between two revisions using something like

svn diff -r 100:200 > file.diff

But the problem is that there are many lines that show up due to change in whitespace. Is there a way to only write those lines that actually change in a significant way and not just in whitespace?

Answer

jrbjazz picture jrbjazz · Nov 16, 2009

You can use

svn diff -r 100:200 -x -b > file.diff

If you want to ignore all whitespaces:

svn diff -x -w | less

Source