diff --git a/spec/app/project-spec.coffee b/spec/app/project-spec.coffee index 239c56d40..810e49d85 100644 --- a/spec/app/project-spec.coffee +++ b/spec/app/project-spec.coffee @@ -320,6 +320,22 @@ describe "Project", -> expect(paths[0]).toBe filePath expect(matches.length).toBe 1 + it "excludes values in core.ignoredNames", -> + projectPath = '/tmp/atom-tests/folder-with-dot-git/.git' + filePath = fsUtils.join(projectPath, 'test.txt') + fsUtils.write(filePath, 'match this') + project.setPath(projectPath) + paths = [] + matches = [] + waitsForPromise -> + project.scan /match/, ({path, match, range}) -> + paths.push(path) + matches.push(match) + + runs -> + expect(paths.length).toBe 0 + expect(matches.length).toBe 0 + describe "serialization", -> it "restores the project path", -> newProject = Project.deserialize(project.serialize()) diff --git a/src/app/project.coffee b/src/app/project.coffee index 146894caa..45c453f3f 100644 --- a/src/app/project.coffee +++ b/src/app/project.coffee @@ -276,6 +276,8 @@ class Project command = require.resolve('nak') args = ['--hidden', '--ackmate', regex.source, @getPath()] + ignoredNames = config.get('core.ignoredNames') ? [] + args.unshift('--ignore', ignoredNames.join(',')) if ignoredNames.length > 0 args.unshift("--addVCSIgnores") if config.get('core.excludeVcsIgnoredPaths') new BufferedProcess({command, args, stdout, exit}) deferred