diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index edf75ed..06f06de 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1315,12 +1315,7 @@ function! fugitive#FileWriteCmd(...) abort let old_mode = executable(s:Tree(dir) . file) ? '100755' : '100644' endif let info = old_mode.' '.sha1.' '.commit."\t".file[1:-1] - call writefile([info],tmp) - if s:winshell() - let error = s:System('type '.s:gsub(tmp,'/','\\').'|'.s:Prepare(dir, 'update-index', '--index-info')) - else - let error = s:System(s:Prepare(dir, 'update-index', '--index-info').' < '.tmp) - endif + let error = system(s:Prepare(dir, 'update-index', '--index-info'), info . "\n") if v:shell_error == 0 setlocal nomodified if exists('#' . autype . 'WritePost')