Git hook stuck on certain commit message
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### What did you expect to happen?
When I commit with the following commit message in `~/.emacs.d`, the commit-msg hook installed by Doom should exit in a reasonable time and give proper feedback.
```
tweak(cc): default to +lsp
Without +lsp, both irony-mode and rtags require separate configuration
for system header path on macOS.
See:
* https://github.com/Sarcasm/irony-mode/wiki/Mac-OS-X-issues-and-workaround
* https://github.com/Andersbakken/rtags/issues/811
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# ...
```
### What actually happened?
`doom --nocolor ci hook-commit-msg .git/COMMIT_EDITMSG` stuck and consumes 100% CPU.
### Describe your attempts to resolve the issue
I tried downgrading to Emacs 28 with and without nativecomp, but it still stuck.
### Steps to reproduce
1. Open Emacs 28.0.91 with nativecomp.
2. Modify `init.example.el`.
3. Open magit buffer and try to commit with the above commit message.
4. Magit says "Message saved", but the commit is not created.
5. `/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs --no-site-file --script /Users/xxx/.emacs.d/bin/doom -- --nocolor ci hook-commit-msg .git/COMMIT_EDITMSG` consumes 100% CPU and does not exit in a reasonable amount of time.
### System Information
https://pastebin.com/jHN5H9am
Contributor guide
Assessment
This issue has not been assessed yet.