From 149794dd1db18b22f4df94ef13cf61520d7be1d8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 17 Feb 2010 12:30:41 -0800 Subject: status: preload index to optimize lstat(2) calls Noticed by James Pickens Signed-off-by: Junio C Hamano diff --git a/builtin-commit.c b/builtin-commit.c index 55676fd..bb97000 100644 --- a/builtin-commit.c +++ b/builtin-commit.c @@ -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; -- cgit v0.10.2-6-g49f6