mirror of
https://github.com/git/git.git
synced 2026-01-29 11:59:21 +00:00
Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache
add: use preload-index and fscache for performance
This commit is contained in:
@@ -376,9 +376,6 @@ int cmd_add(int argc, const char **argv, const char *prefix)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (read_cache() < 0)
|
||||
die(_("index file corrupt"));
|
||||
|
||||
/*
|
||||
* Check the "pathspec '%s' did not match any files" block
|
||||
* below before enabling new magic.
|
||||
@@ -389,6 +386,10 @@ int cmd_add(int argc, const char **argv, const char *prefix)
|
||||
PATHSPEC_STRIP_SUBMODULE_SLASH_EXPENSIVE,
|
||||
prefix, argv);
|
||||
|
||||
enable_fscache(1);
|
||||
if (read_cache_preload(&pathspec) < 0)
|
||||
die(_("index file corrupt"));
|
||||
|
||||
if (add_new_files) {
|
||||
int baselen;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user