From 6e4cb9874af63424a5785eea0f33fdfd38dce424 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Sat, 2 Feb 2013 17:04:33 -0800 Subject: [PATCH] :lipstick: --- src/packages/fuzzy-finder/src/load-paths-handler.coffee | 7 +++---- src/packages/fuzzy-finder/src/load-paths-task.coffee | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/packages/fuzzy-finder/src/load-paths-handler.coffee b/src/packages/fuzzy-finder/src/load-paths-handler.coffee index 41ed34fa8..98c439d3d 100644 --- a/src/packages/fuzzy-finder/src/load-paths-handler.coffee +++ b/src/packages/fuzzy-finder/src/load-paths-handler.coffee @@ -3,14 +3,13 @@ _ = require 'underscore' Git = require 'git' module.exports = - loadPaths: (rootPath, ignoredNames, ignoreGitIgnoredFiles) -> + loadPaths: (rootPath, ignoredNames, excludeGitIgnoredPaths) -> paths = [] - repo = Git.open(rootPath, refreshIndexOnFocus: false) if ignoreGitIgnoredFiles + repo = Git.open(rootPath, refreshIndexOnFocus: false) if excludeGitIgnoredPaths isIgnored = (path) -> for segment in path.split('/') return true if _.contains(ignoredNames, segment) - return true if repo?.isPathIgnored(fs.join(rootPath, path)) - false + repo?.isPathIgnored(fs.join(rootPath, path)) onFile = (path) -> paths.push(path) unless isIgnored(path) onDirectory = (path) -> diff --git a/src/packages/fuzzy-finder/src/load-paths-task.coffee b/src/packages/fuzzy-finder/src/load-paths-task.coffee index 7f7a31baa..64bf095b5 100644 --- a/src/packages/fuzzy-finder/src/load-paths-task.coffee +++ b/src/packages/fuzzy-finder/src/load-paths-task.coffee @@ -6,11 +6,11 @@ class LoadPathsTask extends Task super('fuzzy-finder/src/load-paths-handler') started: -> - ignoredNames = config.get("fuzzyFinder.ignoredNames") ? [] - ignoredNames = ignoredNames.concat(config.get("core.ignoredNames") ? []) - ignoreGitIgnoredFiles = config.get("core.hideGitIgnoredFiles") + ignoredNames = config.get('fuzzyFinder.ignoredNames') ? [] + ignoredNames = ignoredNames.concat(config.get('core.ignoredNames') ? []) + excludeGitIgnoredPaths = config.get('core.hideGitIgnoredFiles') rootPath = @rootView.project.getPath() - @callWorkerMethod('loadPaths', rootPath, ignoredNames, ignoreGitIgnoredFiles) + @callWorkerMethod('loadPaths', rootPath, ignoredNames, excludeGitIgnoredPaths) pathsLoaded: (paths) -> @terminate()