Totally reimplemented logic for different commit messages