Skip to content

Commit

Permalink
status: preload index to optimize lstat(2) calls
Browse files Browse the repository at this point in the history
Noticed by James Pickens

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Feb 17, 2010
1 parent e923eae commit 149794d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 149794d

Please sign in to comment.