From 49c6be334c0b7950c837bd9f69c30c9f5ccd2e97 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 7 Jun 2012 22:05:06 -0400 Subject: [PATCH] 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. --- plugin/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index fa33917..96cd1d6 100644 --- 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