status: preload index to optimize lstat(2) calls
Noticed by James Pickens Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Feb 17, 2010 at 12:30 UTC
149794dd1db18b22f4df94ef13cf61520d7be1d8
1 file changed
+1
-1
builtin-commit.c
+1
-1
@@ -1046,7 +1046,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
1046
if (*argv)
1047
s.pathspec = get_pathspec(prefix, argv);
1048
1049
- read_cache();
1049
+ read_cache_preload(s.pathspec);
1050
refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, s.pathspec, NULL, NULL);
1051
s.is_initial = get_sha1(s.reference, sha1) ? 1 : 0;
1052
s.in_merge = in_merge;