diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-02-17 12:30:41 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-02-17 12:30:41 -0800 |
commit | 149794dd1db18b22f4df94ef13cf61520d7be1d8 (patch) | |
tree | fda4a22be6416f2b3f9ac324d371d1757ecf58c9 | |
parent | e923eaeb901ff056421b9007adcbbce271caa7b6 (diff) | |
download | git-149794dd1db18b22f4df94ef13cf61520d7be1d8.tar.gz git-149794dd1db18b22f4df94ef13cf61520d7be1d8.tar.xz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-commit.c b/builtin-commit.c index 55676fd87..bb9700032 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; |