From: Junio C Hamano Date: Wed, 17 Feb 2010 20:30:41 +0000 (-0800) Subject: status: preload index to optimize lstat(2) calls X-Git-Tag: v1.7.0.2~12^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/149794dd1db18b22f4df94ef13cf61520d7be1d8?hp=--cc status: preload index to optimize lstat(2) calls Noticed by James Pickens Signed-off-by: Junio C Hamano --- 149794dd1db18b22f4df94ef13cf61520d7be1d8 diff --git a/builtin-commit.c b/builtin-commit.c index 55676fd874..bb97000320 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;