Skip to content

Commit ed8e6b1

Browse files
authored
Merge pull request #12 from tommarshall/11-fix-edit-option
Fix edit option
2 parents 1985c50 + 7084110 commit ed8e6b1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hook.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ set_colors() {
4141
#
4242

4343
set_editor() {
44-
HOOK_EDITOR=$GIT_EDITOR
44+
# $GIT_EDITOR appears to always be set to `:` when the hook is executed by Git?
45+
# ref: http://stackoverflow.com/q/41468839/885540
46+
# ref: https://github.com/tommarshall/git-good-commit/issues/11
47+
# HOOK_EDITOR=$GIT_EDITOR
4548
test -z "${HOOK_EDITOR}" && HOOK_EDITOR=$(git config --get core.editor)
4649
test -z "${HOOK_EDITOR}" && HOOK_EDITOR=$VISUAL
4750
test -z "${HOOK_EDITOR}" && HOOK_EDITOR=$EDITOR

0 commit comments

Comments
 (0)