Skip to content

Commit 40590db

Browse files
committed
Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache
add: use preload-index and fscache for performance
2 parents f53e464 + ff45c76 commit 40590db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

builtin/add.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,10 @@ int cmd_add(int argc, const char **argv, const char *prefix)
462462
die_in_unpopulated_submodule(&the_index, prefix);
463463
die_path_inside_submodule(&the_index, &pathspec);
464464

465+
enable_fscache(1);
466+
/* We do not really re-read the index but update the up-to-date flags */
467+
preload_index(&the_index, &pathspec, 0);
468+
465469
if (add_new_files) {
466470
int baselen;
467471

0 commit comments

Comments
 (0)