mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
@@ -2068,9 +2068,17 @@ function! s:BufReadIndex()
|
|||||||
else
|
else
|
||||||
let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd '
|
let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd '
|
||||||
let dir = getcwd()
|
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
|
try
|
||||||
execute cd.'`=s:repo().tree()`'
|
execute cd.'`=s:repo().tree()`'
|
||||||
call s:ReplaceCmd(s:repo().git_command('status'),index)
|
call s:ReplaceCmd(cmd, index)
|
||||||
finally
|
finally
|
||||||
execute cd.'`=dir`'
|
execute cd.'`=dir`'
|
||||||
endtry
|
endtry
|
||||||
|
|||||||
Reference in New Issue
Block a user