Upgraded magit to 1.2.0.
C-c w delete-trailing-whitespace

Don't want this to happen automatically when working on existing code.