How can we ignore coding convention while generating diff using svn?
To elaborate, I do not want to distinguish between the following two coding styles
while (variableIter.hasNext())
{
lModel = variableIter.next();
}
AND
while (variableIter.hasNext()) {
lModel = variableIter
.next();
}
If I run a svn diff, I'll get the following diff:
- while (variableIter.hasNext())
- {
- lModel = variableIter.next();
+ while (variableIter.hasNext()) {
+ lModel = variableIter
+ .next();
But I do not want this to be part of the diff. I'd like svn to ignore this kind of coding style differences. So, is there any option in svn which can help me do this? OR is there a script or something I could run on the svn generated diff to spit out only real changes and not the coding style changes?
TIA
I don't know if svn has a builtin function to do that. Anyway you could use some tool to uniformily indent your code before submitting, like the indent tool for C (http://www.gnu.org/software/indent/).
Or you can try to launch the diff with this option:
svn diff -x -w
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With