mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Allow applying from git diffs to work under win32.
The introduction of using 'chcp' in the git.cmd wrapper was causing the piped in values to be gobbled by the chcp in the call to update-index. Signed-off-by: Michael Geddes <vimmer@frog.wheelycreek.net>
This commit is contained in:
@@ -1431,7 +1431,11 @@ function! s:BufWriteIndexFile()
|
||||
endif
|
||||
let info = old_mode.' '.sha1.' '.stage."\t".path
|
||||
call writefile([info],tmp)
|
||||
let error = system(s:repo().git_command('update-index','--index-info').' < '.tmp)
|
||||
if has('win32')
|
||||
let error = system('type '.tmp.'|'.s:repo().git_command('update-index','--index-info'))
|
||||
else
|
||||
let error = system(s:repo().git_command('update-index','--index-info').' < '.tmp)
|
||||
endif
|
||||
if v:shell_error == 0
|
||||
setlocal nomodified
|
||||
silent execute 'doautocmd BufWritePost '.s:fnameescape(expand('%:p'))
|
||||
|
||||
Reference in New Issue
Block a user