commit ed36717a686e2cba5a5338c2ba468d97e9a42968 (tree)
parent b1ab9903142c3f49b645c467b9f1c7879e7e0774
Author: Tim Pope <code@tpope.net>
Date: Sun, 19 Aug 2018 23:26:19 -0400
Use 2 argument system() rather than stdin redirect
Diffstat:
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git 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')