Add GIT_EDITOR environment and core.editor configuration variables
[gitweb.git] / git-am.sh
index e5e6f2c91c1faf58239ab73672fbb05cda91762f..bfd65dcf955187030e183b11c164abe02e9bbe62 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -364,7 +364,7 @@ do
                [yY]*) action=yes ;;
                [aA]*) action=yes interactive= ;;
                [nN]*) action=skip ;;
-               [eE]*) "${VISUAL:-${EDITOR:-vi}}" "$dotest/final-commit"
+               [eE]*) git_editor "$dotest/final-commit"
                       action=again ;;
                [vV]*) action=again
                       LESS=-S ${PAGER:-less} "$dotest/patch" ;;