Use 2 argument system() rather than stdin redirect

This commit is contained in:
Tim Pope 2018-08-19 23:26:19 -04:00
parent b1ab990314
commit ed36717a68

View File

@ -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')