зеркало из https://github.com/microsoft/git.git
Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache
add: use preload-index and fscache for performance
This commit is contained in:
Коммит
514ebd1966
|
@ -593,6 +593,10 @@ int cmd_add(int argc, const char **argv, const char *prefix)
|
|||
die_in_unpopulated_submodule(&the_index, prefix);
|
||||
die_path_inside_submodule(&the_index, &pathspec);
|
||||
|
||||
enable_fscache(1);
|
||||
/* We do not really re-read the index but update the up-to-date flags */
|
||||
preload_index(&the_index, &pathspec, 0);
|
||||
|
||||
if (add_new_files) {
|
||||
int baselen;
|
||||
|
||||
|
@ -695,6 +699,7 @@ finish:
|
|||
die(_("Unable to write new index file"));
|
||||
|
||||
dir_clear(&dir);
|
||||
enable_fscache(0);
|
||||
UNLEAK(pathspec);
|
||||
return exit_status;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче