You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm facing this obscure issue that with commit message titles start with # (e.g. #16: This is a sample commit for the issue 16)
Behaviours:
Without Overcommit (or after overcommit --uninstall)
No problems with commit messages start with #
With Overcommit
With the default Git config
Git will clean up and strip the commit title, so it becomes empty
Then overcommit rejects it due to EmptyMessage rule (which is the correct behaviour of course)
With git config --global core.commentchar ';' set
Git still cleans up and strips the commit title with #, so it becomes empty again
Then overcommit ignores the empty message and doesn't reject the commit (even if EmptyMessage is enabled by default)
With git config --global commit.cleanup whitespace set
Maybe I'm doing something wrong here. Setting git commit.cleanup mode has no effect on anything. The commit message is still gone and overcommit is rejecting the empty message.
Use git commit -m "#16: This is a sample commit for the issue 16" --cleanup=whitespace
Same as above. No effect when it should.
The text was updated successfully, but these errors were encountered:
I'm facing this obscure issue that with commit message titles start with # (e.g.
#16: This is a sample commit for the issue 16
)Behaviours:
Without Overcommit (or after
overcommit --uninstall
)With Overcommit
EmptyMessage
rule (which is the correct behaviour of course)git config --global core.commentchar ';'
set#
, so it becomes empty againgit config --global commit.cleanup whitespace
setgit commit -m "#16: This is a sample commit for the issue 16" --cleanup=whitespace
The text was updated successfully, but these errors were encountered: