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"
16 unset EDITOR VISUAL GIT_EDITOR
18 test_expect_success setup
'
21 echo "$msg" >expect &&
24 git commit -m "$msg" &&
25 git show -s --pretty=oneline |
26 sed -e "s/^[0-9a-f]* //" >actual &&
33 test_expect_success
'dumb should error out when falling back on vi' '
46 for i
in vi EDITOR VISUAL core_editor GIT_EDITOR
48 echo "Edited by $i" >expect
49 unset EDITOR VISUAL GIT_EDITOR
50 git config
--unset-all core.editor
53 git config core.editor .
/e-core_editor.sh
60 test_expect_success
"Using $i" '
61 git --exec-path=. commit --amend &&
62 git show -s --pretty=oneline |
63 sed -e "s/^[0-9a-f]* //" >actual &&
68 unset EDITOR VISUAL GIT_EDITOR
69 git config
--unset-all core.editor
70 for i
in vi EDITOR VISUAL core_editor GIT_EDITOR
72 echo "Edited by $i" >expect
75 git config core.editor .
/e-core_editor.sh
82 test_expect_success
"Using $i (override)" '
83 git --exec-path=. commit --amend &&
84 git show -s --pretty=oneline |
85 sed -e "s/^[0-9a-f]* //" >actual &&