Skip to content

Commit 6ea47b3

Browse files
dschoGit for Windows Build Agent
authored andcommitted
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 <[email protected]>
1 parent 249c11f commit 6ea47b3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin/clean.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
995995

996996
if (read_cache() < 0)
997997
die(_("index file corrupt"));
998+
enable_fscache(active_nr);
998999

9991000
if (!ignored)
10001001
setup_standard_excludes(&dir);
@@ -1084,6 +1085,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
10841085
}
10851086
}
10861087

1088+
disable_fscache();
10871089
strbuf_release(&abs_path);
10881090
strbuf_release(&buf);
10891091
string_list_clear(&del_list, 0);

0 commit comments

Comments
 (0)