tommarshall / git-good-commit

Git hook to help you write good commit messages, with no external dependencies.
MIT License
195 stars 33 forks source link

Edit option not working #11

Closed tommarshall closed 7 years ago

tommarshall commented 7 years ago

The e (edit commit message) option is not working in v0.6.0.

Selecting e should re-open the commit in the user's editor again. This is not happening. Instead it simply causes the hook to prompt the user for input again.

tommarshall commented 7 years ago

This appears to be caused because $GIT_EDITOR is set to : inside the commit-msg hook, regardless of whether $GIT_EDITOR is set or not in the outer shell. It's not clear to me why.

tommarshall commented 7 years ago

The quick fix is to remove the $GIT_EDITOR env variable from the editor stack.