commit 49c6be334c0b7950c837bd9f69c30c9f5ccd2e97 (tree)
parent 1eb4a9f7e32d0da674fbd58c6993f2d27bcecee3
Author: Tim Pope <code@tpope.net>
Date: Thu, 7 Jun 2012 22:05:06 -0400
Override 'shellslash' for external Windows command
With 'shellslash' set, tempname() returns a filename with forward
slashes, which trips up the type command if we don't translate to
backslashes first.
Fixes half of #212.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -2057,7 +2057,7 @@ function! s:BufWriteIndexFile()
let info = old_mode.' '.sha1.' '.stage."\t".path
call writefile([info],tmp)
if has('win32')
- let error = system('type '.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
let error = system(s:repo().git_command('update-index','--index-info').' < '.tmp)
endif