removing trailing whitespace from patch

I have no idea why the patch might not be working.

Could the git index part be the culprit?