Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_fscache

add: use preload-index and fscache for performance
This commit is contained in:
Johannes Schindelin
2016-11-23 11:41:19 +01:00
committed by GitHub

View File

@@ -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;