First try at fixing it: a tiny script to fix the file before committing.
Oops, that introduced a huge number of changes and would mess up history quite a bit, not the way to go.
So I added this to my ~/.gitconfig:
whitespace = -trailing-space
and now I can see the important changes in the diffs again.