Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

style cleanup that doesn't trample svn blame?

I'd like to use Eclipse's formatter to fix some poorly styled code, but there's a huge downside to killing all the metadata in the repository about who is responsible for what. Any thoughts on ways to get around this? Perhaps it is just completely impossible...

like image 807
Jacob Avatar asked Mar 27 '09 04:03

Jacob


2 Answers

You can tell blame to ignore whitespace changes:

svn blame -x -w file/path

Of course that only works if your style fix doesn't change more than whitespaces.

like image 79
Stefan Avatar answered Oct 21 '22 14:10

Stefan


The history is still there, you'll just have to look at a blame prior to the cleanup revision.

This is one good reason to have a style standard. Indentation changes can cause a lot of merge conflicts, etc. "Poorly styled" to one is well written to another.

like image 42
jthompson Avatar answered Oct 21 '22 15:10

jthompson