From 099d65826e0e0863552a92f7e574e3f24c8f4197 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 5 Mar 2016 19:37:40 +0100 Subject: [PATCH] Don't use spaces in Git command to avoid problems under Windows When using a helper script to make Windows Vim work with Cygwin Git, arguments containing spaces don't survive being passed through "cmd /c" to this script and are decomposed into several tokens. Just use "%x20" instead of spaces in the pretty format to avoid the problem. --- plugin/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 9a13fa7..d53530c 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -2689,7 +2689,7 @@ function! s:BufReadObject() abort if b:fugitive_display_format call s:ReplaceCmd(s:repo().git_command('cat-file',b:fugitive_type,hash)) else - call s:ReplaceCmd(s:repo().git_command('show','--no-color','--pretty=format:tree %T%nparent %P%nauthor %an <%ae> %ad%ncommitter %cn <%ce> %cd%nencoding %e%n%n%s%n%n%b',hash)) + call s:ReplaceCmd(s:repo().git_command('show','--no-color','--pretty=format:tree%x20%T%nparent%x20%P%nauthor%x20%an%x20<%ae>%x20%ad%ncommitter%x20%cn%x20<%ce>%x20%cd%nencoding%x20%e%n%n%s%n%n%b',hash)) keepjumps call search('^parent ') if getline('.') ==# 'parent ' silent keepjumps delete_