3 test_description
='GIT_EDITOR, core.editor, and stuff'
7 for i
in GIT_EDITOR core_editor EDITOR VISUAL vi
10 echo "Edited by $i" >"\$1"
17 unset EDITOR VISUAL GIT_EDITOR
19 test_expect_success setup
'
22 echo "$msg" >expect &&
25 git commit -m "$msg" &&
26 git show -s --pretty=oneline |
27 sed -e "s/^[0-9a-f]* //" >actual &&
34 test_expect_success
'dumb should error out when falling back on vi' '
47 for i
in vi EDITOR VISUAL core_editor GIT_EDITOR
49 echo "Edited by $i" >expect
50 unset EDITOR VISUAL GIT_EDITOR
51 git config
--unset-all core.editor
54 git config core.editor .
/e-core_editor.sh
61 test_expect_success
"Using $i" '
63 git show -s --pretty=oneline |
64 sed -e "s/^[0-9a-f]* //" >actual &&
69 unset EDITOR VISUAL GIT_EDITOR
70 git config
--unset-all core.editor
71 for i
in vi EDITOR VISUAL core_editor GIT_EDITOR
73 echo "Edited by $i" >expect
76 git config core.editor .
/e-core_editor.sh
83 test_expect_success
"Using $i (override)" '
85 git show -s --pretty=oneline |
86 sed -e "s/^[0-9a-f]* //" >actual &&