Skip to content

Commit

Permalink
Only diff known changed files for status
Browse files Browse the repository at this point in the history
This should improve performance on large repositories.

References: #2207
  • Loading branch information
tpope committed Sep 18, 2023
1 parent 86a372d commit 7679842
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/fugitive.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2793,7 +2793,7 @@ function! fugitive#BufReadStatus(cmdbang) abort
let diff['Staged'] = fugitive#Execute(diff_cmd + ['--cached'], function('len'))
endif
if len(unstaged)
let diff['Unstaged'] = fugitive#Execute(diff_cmd, function('len'))
let diff['Unstaged'] = fugitive#Execute(diff_cmd + map(copy(unstaged), 'v:val.relative[0]'), function('len'))
endif

for dict in staged
Expand Down

0 comments on commit 7679842

Please sign in to comment.