Empty commit message throws error
See original GitHub issueProviding an empty commit message (normally used to abort committing in git), throws an error message. Length is being used without checking that it is avaible
Version 7.5.2
TypeError: Cannot read property 'length' of null
at exports.default (./node_modules/@commitlint/rules/lib/header-max-length.js:10:143)
at results.filter.map.entry (./node_modules/@commitlint/lint/lib/index.js:138:17)
at Array.map (<anonymous>)
at Object.<anonymous> (./node_modules/@commitlint/lint/lib/index.js:118:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
husky > commit-msg hook failed (add --no-verify to bypass)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:7 (2 by maintainers)
Top Results From Across the Web
husky - Strange error when attempting to commit. [subject-empty]
What it means is that you've added a non-Git program (specifically, something called "husky") and told Git to use Husky to check your...
Read more >Git - git-commit Documentation
This file contains the commit message of a commit in progress. If git commit exits due to an error before creating a commit,...
Read more >git commit --allow-empty (Example) - Coderwall
Sometimes I need to make empty commits on throw away branches so that I can trigger various kinds of things for a variety...
Read more >Commit messages - Koha Wiki
5) Repeat step 2. 6) Observe the error is gone. 7) Sign off. A detailed test plan, with a clear heading. It should...
Read more >Can't commit files because of empty commit message
Succesfull commit. What happens instead? IDE shows me an error of empty commit message. PhpStorm 2021.1 git. Screenshot 2021-04-13 at 10.03.36 1.png
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can also reproduce this by running
git commit
and then aborting & exiting vim with just:q!
(without writing anything).@escapedcat I can reproduce this by running
git commit
and exiting vim (:wq
) right away, without writing anything.