1
0
mirror of https://github.com/git/git.git synced 2024-09-28 20:51:42 +02:00

status: preload index to optimize lstat(2) calls

Noticed by James Pickens

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano 2010-02-17 12:30:41 -08:00
parent e923eaeb90
commit 149794dd1d

@ -1046,7 +1046,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
if (*argv)
s.pathspec = get_pathspec(prefix, argv);
read_cache();
read_cache_preload(s.pathspec);
refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL);
s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0;
s.in_merge = in_merge;