The `git clean` command needs to enumerate plenty of files and
directories, and can therefore benefit from the FSCache.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2018-12-11 12:17:49 +01:00
Родитель 27961dc10e
Коммит dcd00e9a41
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -1039,6 +1039,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
if (repo_read_index(the_repository) < 0)
die(_("index file corrupt"));
enable_fscache(the_index.cache_nr);
pl = add_pattern_list(&dir, EXC_CMDL, "--exclude option");
for (i = 0; i < exclude_list.nr; i++)
@ -1113,6 +1114,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
}
}
disable_fscache();
strbuf_release(&abs_path);
strbuf_release(&buf);
string_list_clear(&del_list, 0);