mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 13:53:51 -05:00
Improve parallelism of status buffer with earlier diff
This is a trivial gain, but also trivial to implement.
This commit is contained in:
@@ -2669,6 +2669,16 @@ function! fugitive#BufReadStatus() abort
|
||||
endwhile
|
||||
endif
|
||||
|
||||
let diff = {'Staged': {'stdout': ['']}, 'Unstaged': {'stdout': ['']}}
|
||||
if len(staged)
|
||||
let diff['Staged'] =
|
||||
\ fugitive#Execute(['diff', '--color=never', '--no-ext-diff', '--no-prefix', '--cached'], function('len'))
|
||||
endif
|
||||
if len(unstaged)
|
||||
let diff['Unstaged'] =
|
||||
\ fugitive#Execute(['diff', '--color=never', '--no-ext-diff', '--no-prefix'], function('len'))
|
||||
endif
|
||||
|
||||
for dict in staged
|
||||
let b:fugitive_files['Staged'][dict.filename] = dict
|
||||
endfor
|
||||
@@ -2745,15 +2755,6 @@ function! fugitive#BufReadStatus() abort
|
||||
endfor
|
||||
endif
|
||||
|
||||
let diff = {'Staged': {'stdout': ['']}, 'Unstaged': {'stdout': ['']}}
|
||||
if len(staged)
|
||||
let diff['Staged'] =
|
||||
\ fugitive#Execute(['diff', '--color=never', '--no-ext-diff', '--no-prefix', '--cached'], function('len'))
|
||||
endif
|
||||
if len(unstaged)
|
||||
let diff['Unstaged'] =
|
||||
\ fugitive#Execute(['diff', '--color=never', '--no-ext-diff', '--no-prefix'], function('len'))
|
||||
endif
|
||||
let b:fugitive_diff = diff
|
||||
if v:cmdbang
|
||||
unlet! b:fugitive_expanded
|
||||
|
||||
Reference in New Issue
Block a user