In a lot of cases, it makes sense to have the editor checking that. But if
it causes a load of unwanted changes, it's good to avoid committing them.
You can use git add -p to stage part of a file. It's quite a minor problem,
though.