3 test_description
='GIT_EDITOR, core.editor, and stuff'
9 for i
in GIT_EDITOR core_editor EDITOR VISUAL vi
12 echo "Edited by $i" >"\$1"
19 unset EDITOR VISUAL GIT_EDITOR
21 test_expect_success setup
'
24 echo "$msg" >expect &&
27 git commit -m "$msg" &&
28 git show -s --pretty=oneline |
29 sed -e "s/^[0-9a-f]* //" >actual &&
36 test_expect_success
'dumb should error out when falling back on vi' '
49 for i
in vi EDITOR VISUAL core_editor GIT_EDITOR
51 echo "Edited by $i" >expect
52 unset EDITOR VISUAL GIT_EDITOR
53 git config
--unset-all core.editor
56 git config core.editor .
/e-core_editor.sh
63 test_expect_success
"Using $i" '
65 git show -s --pretty=oneline |
66 sed -e "s/^[0-9a-f]* //" >actual &&
71 unset EDITOR VISUAL GIT_EDITOR
72 git config
--unset-all core.editor
73 for i
in vi EDITOR VISUAL core_editor GIT_EDITOR
75 echo "Edited by $i" >expect
78 git config core.editor .
/e-core_editor.sh
85 test_expect_success
"Using $i (override)" '
87 git show -s --pretty=oneline |
88 sed -e "s/^[0-9a-f]* //" >actual &&