Use the same WalkBuilder configuration for the global search file picker as the default file picker (#4334)

Skip searching .git in global search, similar to how file picker skips listing files in .git.
This commit is contained in:
Philipp Mildenberger 2022-10-18 19:28:16 +02:00 committed by GitHub
parent fee5db161b
commit d17ffc47f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1865,10 +1865,15 @@ fn label(&self, current_path: &Self::Data) -> Spans {
.hidden(file_picker_config.hidden)
.parents(file_picker_config.parents)
.ignore(file_picker_config.ignore)
.follow_links(file_picker_config.follow_symlinks)
.git_ignore(file_picker_config.git_ignore)
.git_global(file_picker_config.git_global)
.git_exclude(file_picker_config.git_exclude)
.max_depth(file_picker_config.max_depth)
// We always want to ignore the .git directory, otherwise if
// `ignore` is turned off above, we end up with a lot of noise
// in our picker.
.filter_entry(|entry| entry.file_name() != ".git")
.build_parallel()
.run(|| {
let mut searcher = searcher.clone();