mirror of
https://github.com/git-for-windows/git.git
synced 2026-05-31 12:28:51 -05:00
Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache
add: use preload-index and fscache for performance
This commit is contained in:
@@ -475,6 +475,10 @@ int cmd_add(int argc,
|
||||
die_in_unpopulated_submodule(repo->index, prefix);
|
||||
die_path_inside_submodule(repo->index, &pathspec);
|
||||
|
||||
enable_fscache(1);
|
||||
/* We do not really re-read the index but update the up-to-date flags */
|
||||
preload_index(repo->index, &pathspec, 0);
|
||||
|
||||
if (add_new_files) {
|
||||
int baselen;
|
||||
|
||||
@@ -587,5 +591,6 @@ finish:
|
||||
free(ps_matched);
|
||||
dir_clear(&dir);
|
||||
clear_pathspec(&pathspec);
|
||||
enable_fscache(0);
|
||||
return exit_status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user