mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-28 05:46:45 -05: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:
committed by
Victoria Dye
parent
54e2a2e68a
commit
d113ec1b64
@@ -1012,6 +1012,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
|
||||
|
||||
if (read_cache() < 0)
|
||||
die(_("index file corrupt"));
|
||||
enable_fscache(active_nr);
|
||||
|
||||
pl = add_pattern_list(&dir, EXC_CMDL, "--exclude option");
|
||||
for (i = 0; i < exclude_list.nr; i++)
|
||||
@@ -1086,6 +1087,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);
|
||||
|
||||
Reference in New Issue
Block a user