Merge branch 'jc/maint-status-preload'
authorJunio C Hamano <gitster@pobox.com>
Tue, 2 Mar 2010 20:44:07 +0000 (12:44 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 2 Mar 2010 20:44:07 +0000 (12:44 -0800)
* jc/maint-status-preload:
status: preload index to optimize lstat(2) calls

1  2 
builtin-commit.c
diff --combined builtin-commit.c
index 46513bf90b9caf95f4c1b0b902dfc69feea38d1f,bb97000320534a0946673edefafdafc74d27d259..f4c73442cfba9483a826dcfbf68f5466d43e8351
@@@ -41,7 -41,7 +41,7 @@@ static const char implicit_ident_advice
  "on your username and hostname. Please check that they are accurate.\n"
  "You can suppress this message by setting them explicitly:\n"
  "\n"
 -"    git config --global user.name Your Name\n"
 +"    git config --global user.name \"Your Name\"\n"
  "    git config --global user.email you@example.com\n"
  "\n"
  "If the identity used for this commit is wrong, you can fix it with:\n"
@@@ -1046,7 -1046,7 +1046,7 @@@ int cmd_status(int argc, const char **a
        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;