mirror of
https://github.com/git-for-windows/git.git
synced 2026-02-04 21:42:59 -06:00
clean: make use of FSCache
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:
parent
014d3fe6dc
commit
bc90e75a3f
@ -1043,6 +1043,7 @@ int cmd_clean(int argc,
|
||||
|
||||
if (repo_read_index(the_repository) < 0)
|
||||
die(_("index file corrupt"));
|
||||
enable_fscache(the_repository->index->cache_nr);
|
||||
|
||||
pl = add_pattern_list(&dir, EXC_CMDL, "--exclude option");
|
||||
for (i = 0; i < exclude_list.nr; i++)
|
||||
@ -1117,6 +1118,7 @@ int cmd_clean(int argc,
|
||||
}
|
||||
}
|
||||
|
||||
disable_fscache();
|
||||
strbuf_release(&abs_path);
|
||||
strbuf_release(&buf);
|
||||
string_list_clear(&del_list, 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user