]> asedeno.scripts.mit.edu Git - git.git/commitdiff
status: preload index to optimize lstat(2) calls
authorJunio C Hamano <gitster@pobox.com>
Wed, 17 Feb 2010 20:30:41 +0000 (12:30 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Feb 2010 20:30:41 +0000 (12:30 -0800)
Noticed by James Pickens

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-commit.c

index 55676fd874466c70445e81c69cf397cd01380aaf..bb97000320534a0946673edefafdafc74d27d259 100644 (file)
@@ -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;