correctly handle empty commit messages