
On 28 May 2012 23:57, John Wiegley <jwiegley@gmail.com> wrote:
Dave Abrahams <dave@boostpro.com> writes:
Yup. But that's not so great either when you start working in someone else's file and it starts adding spurious changes. And yes, I've tried packages that try to be smarter about that. Didn't work for me, so far.
I think I found a package once that only eliminates spurious whitespace in lines that you've changed. But yeah, it wasn't smart enough to be worthwhile. I've never found a good answer to this either.
It seems too obvious to mention, but I've found that using colour diffs with git (which highlights whitespace issues that have been introduced) and cleaning them up using 'git rebase --whitespace=fix' works for me. I think I've seen a git hook somewhere for automatically cleaning up new changes.