Fix write to index with msysgit bash

Closes #388.
This commit is contained in:
Tim Pope 2013-10-09 14:13:45 -04:00
parent 124550cfee
commit 61fac2f738

View File

@ -2152,7 +2152,7 @@ function! s:BufWriteIndexFile()
endif endif
let info = old_mode.' '.sha1.' '.stage."\t".path let info = old_mode.' '.sha1.' '.stage."\t".path
call writefile([info],tmp) call writefile([info],tmp)
if has('win32') if &shell =~# 'cmd'
let error = system('type '.s:gsub(tmp,'/','\\').'|'.s:repo().git_command('update-index','--index-info')) let error = system('type '.s:gsub(tmp,'/','\\').'|'.s:repo().git_command('update-index','--index-info'))
else else
let error = system(s:repo().git_command('update-index','--index-info').' < '.tmp) let error = system(s:repo().git_command('update-index','--index-info').' < '.tmp)