motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 78b405fd5291add609cafc8efb1058ab5e223cda (tree)
parent a0f5c0445eca54b5ce9ed90275fd49feafc998fd
Author: Tim Pope <code@tpope.net>
Date:   Tue,  9 Aug 2011 00:59:38 -0400

Support core.autocrlf=false on Windows

Fixes #99.

Diffstat:
Mplugin/fugitive.vim | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -1652,7 +1652,11 @@ function! s:ReplaceCmd(cmd,...) abort let prefix = 'env GIT_INDEX_FILE='.s:shellesc(a:1).' ' endif endif - call writefile(split(system(prefix.a:cmd), "\n", 1), tmp, 'b') + if &shell =~# 'cmd' + call system('cmd /c "'.prefix.a:cmd.' > '.tmp.'"') + else + call system(' ('.prefix.a:cmd.' > '.tmp.') ') + endif finally if exists('old_index') let $GIT_INDEX_FILE = old_index