Reputation:
Svn diffs are used in a tool called Cornerstone that lets people do quick and dirty code reviews by looking at what's changed. Unfortunately though, if multiple developers use different indentation schemes, e.g. one person is using vi and another is using emacs and another is using a beautifier program, svn's diffing can go haywire and show each person's indentation as a real/functional difference when it's not.
So... how to tell svn to diff things smartly rather than showing every 1-space difference as significant difference?
Thanks.
Upvotes: 10
Views: 7134
Reputation: 17376
Use -x -w
as parameters, e.g.
svn diff -x -w myfile
The -x
is followed by arguments passed to the diff program and, for the default diff used by svn -w
means ignore all whitespace.
Upvotes: 21