Skip to content

commit-msg git hook prevents aborting commit #33

@ctorgalson

Description

@ctorgalson

Sometimes while starting a commit message (i.e. in git commit -v), I realize there's some reason not to commit the changes.

With the git hook in place, the commit is immediately saved when the commit file opens with no feedback of any kind. This results in confusing empty commits in the history like this (the issue id is the entirety of the commit):

Image

This is easily corrected (if noticed immediately) with e.g. git commit --amend or git reset --soft HEAD^, but until you're used to it, it's hard to even detect it happening.

As far as I can tell, the implementation is perfectly correct (i.e. using the commit-message hook), so this may be a problem with no good solution.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions