Permalink
Browse files

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.
  • Loading branch information...
1 parent 1eb4a9f commit 49c6be334c0b7950c837bd9f69c30c9f5ccd2e97 @tpope tpope committed Jun 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugin/fugitive.vim
View
@@ -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

0 comments on commit 49c6be3

Please sign in to comment.