refresh_index: remove unnecessary calls to preload_index()
With refresh_index() learning to utilize preload_index() to speed up its operation there is no longer any benefit to having the caller preload the index first. Remove those unneeded calls by calling read_index() instead of the preload variant. There is no measurable performance impact of this patch - the 2nd call to preload_index() bails out quickly but there is no reason to call it twice. Signed-off-by: Ben Peart <benpeart@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
99ce720c33
commit
6c5b7f55a8
@ -1363,7 +1363,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
|
||||
if (status_format != STATUS_FORMAT_PORCELAIN &&
|
||||
status_format != STATUS_FORMAT_PORCELAIN_V2)
|
||||
progress_flag = REFRESH_PROGRESS;
|
||||
read_index_preload(&the_index, &s.pathspec, progress_flag);
|
||||
read_index(&the_index);
|
||||
refresh_index(&the_index,
|
||||
REFRESH_QUIET|REFRESH_UNMERGED|progress_flag,
|
||||
&s.pathspec, NULL, NULL);
|
||||
|
Reference in New Issue
Block a user