Don't commit submodule change if there is none.

Alternately we could pass `--empty` to `git commit`, but this will
leave less garbage in history.