jorisroovers / gitlint

Linting for your git commit messages
http://jorisroovers.github.io/gitlint
MIT License
803 stars 99 forks source link

Bugfix: ignore-by-author-name crashes without --staged #445

Closed jorisroovers closed 1 year ago

jorisroovers commented 1 year ago

If the user has an ignore-by-author-name rule configured, and when manually passing a git commit message to gitlint using --msg-filename or via STDIN without also using the --staged flag, gitlint crashes because commit.author_name is unknown.

This fix will print a warning instead and skip the rule.

Fixes #403.