How to make svn diff show only changes without spaces between two revisions

I can get the difference between the two versions using something like

svn diff -r 100:200 > file.diff 

But the problem is that there are many lines that appear due to changing spaces. Is there a way to write only those lines that really change in a significant way, and not just in spaces?

+86
svn diff whitespace
Nov 16 '09 at 11:49
source share
4 answers

You can use

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

If you want to ignore all spaces:

 svn diff -x -w | less 

Source

+80
Nov 16 '09 at 12:00
source share

Use -x --ignore-space-change or -x --ignore-all-space . (See svn -h diff .)

+71
Nov 16 '09 at 12:03
source share

You can use an alternative diff command using the -diff-cmd argument to svn diff. diff is a good utility that has many features to ignore spaces.

For example:

 svn diff --diff-cmd /usr/bin/diff -x "-w" 
+7
Nov 16 '09 at 11:59
source share

Please note that the end of the line is not considered a space in this scenario and should be ignored with:

 svn diff -x --ignore-eol-style [etc...] 
+3
Nov 21 '17 at 0:01
source share



All Articles