From 34e2d2538a634a0a820a56994333ffa1fec1bc58 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 24 Oct 2013 00:16:15 -0400 Subject: [PATCH] Work around new status style in 1.8.5 Closes #393. --- plugin/fugitive.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 8ede56f..51e52d8 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -2068,9 +2068,17 @@ function! s:BufReadIndex() else let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd ' let dir = getcwd() + if fugitive#git_version() =~# '^0\|1\.[1-7]\.' + let cmd = s:repo().git_command('status') + else + let cmd = s:repo().git_command( + \ '-c', 'status.displayCommentPrefix=true', + \ '-c', 'color.status=false', + \ 'status') + endif try execute cd.'`=s:repo().tree()`' - call s:ReplaceCmd(s:repo().git_command('status'),index) + call s:ReplaceCmd(cmd, index) finally execute cd.'`=dir`' endtry