summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-02-17 20:30:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-02-17 20:30:41 (GMT)
commit149794dd1db18b22f4df94ef13cf61520d7be1d8 (patch)
treefda4a22be6416f2b3f9ac324d371d1757ecf58c9
parente923eaeb901ff056421b9007adcbbce271caa7b6 (diff)
downloadgit-149794dd1db18b22f4df94ef13cf61520d7be1d8.zip
git-149794dd1db18b22f4df94ef13cf61520d7be1d8.tar.gz
git-149794dd1db18b22f4df94ef13cf61520d7be1d8.tar.bz2
status: preload index to optimize lstat(2) calls
Noticed by James Pickens Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin-commit.c2
1 files changed, 1 insertions, 1 deletions
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;