Use diff.autorefreshindex=0 for git diff.

This improves performance on huge repositories.

See #291 for discussion.
This commit is contained in:
Alexander Shabalin
2016-01-19 10:07:48 +00:00
committed by Andy Stewart
parent ff4f592c58
commit 4510e9b335

View File

@@ -88,7 +88,7 @@ function! gitgutter#diff#run_diff(realtime, use_external_grep)
call setpos("']", op_mark_end)
endif
let cmd .= 'git diff --no-ext-diff --no-color -U0 '.g:gitgutter_diff_args.' -- '
let cmd .= 'git -c "diff.autorefreshindex=0" diff --no-ext-diff --no-color -U0 '.g:gitgutter_diff_args.' -- '
if a:realtime
let cmd .= blob_file.' '.buff_file
else