Search code examples
windowsgitemacsmagit

magit rebasing uses $EDITOR=vim


I have emacs and git installed for windows (have to use windows for work), everything seems ok when I commit, the comment message pops up in emacs nicely, but when rebasing, I select 'interactively' from magit, I get to choose a commit to rebase on, then I press 'C-c C-c', it supposes to switch to git-rebase-todo buffer, but instead I got magit-process buffer, it appears git tries to use vim and stuck there:

run C:/Program Files/Git/mingw64/libexec/git-core/git.exe … "rebase" "-i" "55ec1e8^"
Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal

Press ENTER or type command to continue[?1000l[?25h

It appears magit doesn't modify $EDITOR when rebasing, how do I force magit use emacs? Thank you.


Solution

  • I figured out, it's nothing to do with windows, I have sequence.editor option in gitconfig, it appears magit cannot overwrite this option.