Simplest I can think of:
$ echo 'cat > "$@"' >editor
$ chmod +x editor
$ GIT_EDITOR=./editor git commit -a
stuff
[master b2d3915] stuff
1 file changed, 1 insertion(+)
You'll need to hit enter before ^D.You can add simple Emacs-like keybindings by changing that into
$ echo 'rlwrap cat > "$@"' >editor
Or just learn ed: $ GIT_EDITOR=ed git commit --amend -a
256
1c
stuff and more stuff
.
w
271
[master c5092a6] stuff and more stuff
Date: Thu Apr 6 12:58:18 2017 +0200
1 file changed, 1 insertion(+)
(the numbers are ed telling me how much was read and written; `1c` means change the first line; `.` means I'm done inserting (go back to command mode) and `w` means write/save; exit with ^D)