diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 75cfe20..5cf1ae1 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1176,13 +1176,15 @@ function! s:Merge(cmd, bang, args) abort \ !empty(s:repo().git_chomp('diff-files', '--diff-filter=U'))) let &l:makeprg = g:fugitive_git_executable.' diff-files --name-status --diff-filter=U' else - let &l:makeprg = s:sub(g:fugitive_git_executable.' -c core.editor=false '. - \ a:cmd . (a:args =~# ' \%(--no-edit\|--abort\|-m\)\>' ? '' : ' --edit') . ' ' . a:args, - \ ' *$', '') + let &l:makeprg = s:sub(g:fugitive_git_executable . ' ' . a:cmd . + \ (a:args =~# ' \%(--no-edit\|--abort\|-m\)\>' ? '' : ' --edit') . + \ ' ' . a:args, ' *$', '') endif - if !empty($GIT_EDITOR) + if !empty($GIT_EDITOR) || has('win32') let old_editor = $GIT_EDITOR let $GIT_EDITOR = 'false' + else + let &l:makeprg = 'env GIT_EDITOR=false ' . &l:makeprg endif execute cd fnameescape(s:repo().tree()) silent noautocmd make!