giticket
giticket copied to clipboard
Commit is not aborted for an empty commit message
I observed this potential unwanted behavior. When I commit and then close the editor without typing a commit message, then the commit is aborted due to an empty commit message. However, with this hook, a commit with only the Jira ID is created.
In my opinion, the correct behavor would be to abort here as well. In https://github.com/milin/giticket/blob/master/giticket/giticket.py#L25, I can see that you check if there is already a Jira ID. I would suggest to add an additional step that checks if the commit message it empty.
I just wanted to write the same thing. This plugin works fine for everything, but this is a bit irritating, as I would expect an empty commit message should not trigger a commit, as git also behaves this way.
Sorry this took a bit long to respond.
I'll add this to the backlog but pls feel free to open a PR as well.