From 7679842b904aa7d290087a52c35229ffe8e7b218 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 17 Sep 2023 20:54:14 -0400 Subject: [PATCH] Only diff known changed files for status This should improve performance on large repositories. References: https://github.com/tpope/vim-fugitive/issues/2207 --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index c6f182f..db9eb99 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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