commit 3121f01f5910200cbb2c88b782eef264b5347d25 (tree)
parent ffcc12de5f423f95cb9474d22638032e64b31a9d
Author: Michael Geddes <vimmer@frog.wheelycreek.net>
Date: Thu, 3 Jun 2010 10:42:41 +0800
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>
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -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'))