From ed36717a686e2cba5a5338c2ba468d97e9a42968 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 19 Aug 2018 23:26:19 -0400 Subject: [PATCH] Use 2 argument system() rather than stdin redirect --- autoload/fugitive.vim | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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')