This commit is contained in:
Logan Ramos 2022-06-16 12:38:08 -04:00 committed by GitHub
parent 5a43663aed
commit f4ca89503e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -762,8 +762,9 @@ export class FilesFilter implements ITreeFilter<ExplorerItem, FuzzyScore> {
// Add newly visited .gitignore files to the ignore tree
if (stat.name === '.gitignore') {
this.processIgnoreFile(stat.root.resource.toString(), stat.resource, false);
// Never hide .gitignore files
return true;
// Never hide .gitignore files if explorer.excludeGitIgnore setting is enabled
// We can tell it's enabled if there is an ignore tree for the workspace root
return !!this.ignoreTreesPerRoot.get(stat.root.resource.toString());
}
return this.isVisible(stat, parentVisibility);