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

Does not correctly mirror git's editor config #9

Closed tommarshall closed 7 years ago

tommarshall commented 7 years ago

Git config allows users to specify an editor:

By default, Git uses whatever you’ve set as your default text editor ($VISUAL or $EDITOR) or else falls back to the vi editor to create and edit your commit and tag messages. To change that default to something else, you can use the core.editor setting.

Currently the hook simply uses $EDITOR. It should instead favour core.editor and mirror the fallback approach of Git itself, ref:

https://github.com/git/git/blob/v2.11.0/editor.c#L10-L30