Merge pull request #4689 from ebayer/follow-symlinks

Create a global option to follow symlinks in project-wide search
This commit is contained in:
Ben Ogle
2014-12-19 17:12:03 -08:00
4 changed files with 7 additions and 0 deletions

View File

@@ -105,6 +105,7 @@ You can open this file in an editor from the _Atom > Open Your Config_ menu.
- `core`
- `disabledPackages`: An array of package names to disable
- `excludeVcsIgnoredPaths`: Don't search within files specified by _.gitignore_
- `followSymlinks`: Follow symlinks when searching and scanning root directory
- `ignoredNames`: File names to ignore across all of Atom
- `projectHome`: The directory where projects are assumed to be located
- `themes`: An array of theme names to load, in cascading order

View File

@@ -54,6 +54,7 @@ describe "the `atom` global", ->
describe "loading default config", ->
it 'loads the default core config', ->
expect(atom.config.get('core.excludeVcsIgnoredPaths')).toBe true
expect(atom.config.get('core.followSymlinks')).toBe true
expect(atom.config.get('editor.showInvisibles')).toBe false
describe "window onerror handler", ->

View File

@@ -16,6 +16,10 @@ module.exports =
type: 'boolean'
default: true
title: 'Exclude VCS Ignored Paths'
followSymlinks:
type: 'boolean'
default: true
title: 'Follow symlinks when searching and scanning root directory'
disabledPackages:
type: 'array'
default: []

View File

@@ -195,6 +195,7 @@ class Project extends Model
includeHidden: true
excludeVcsIgnores: atom.config.get('core.excludeVcsIgnoredPaths')
exclusions: atom.config.get('core.ignoredNames')
follow: atom.config.get('core.followSymlinks')
# TODO: need to support all paths in @getPaths()
task = Task.once require.resolve('./scan-handler'), @getPaths()[0], regex.source, searchOptions, ->