mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Move project.ignoredNames to config.core.ignoredNames
This commit is contained in:
@@ -152,7 +152,8 @@ describe "Project", ->
|
||||
|
||||
it "ignores ignored.txt file", ->
|
||||
paths = null
|
||||
project.ignoredNames.push 'ignored.txt'
|
||||
config.get("core.ignoredNames").push("ignored.txt")
|
||||
config.update("core.ignoredNames", config.get("core.ignoredNames"))
|
||||
waitsForPromise ->
|
||||
project.getFilePaths().done (foundPaths) -> paths = foundPaths
|
||||
|
||||
@@ -171,7 +172,8 @@ describe "Project", ->
|
||||
|
||||
it "ignores ignored folder", ->
|
||||
paths = null
|
||||
project.ignoredNames.push 'ignored'
|
||||
config.get("core.ignoredNames").push("ignored.txt")
|
||||
config.update("core.ignoredNames", config.get("core.ignoredNames"))
|
||||
waitsForPromise ->
|
||||
project.getFilePaths().done (foundPaths) -> paths = foundPaths
|
||||
|
||||
|
||||
@@ -23,10 +23,6 @@ class Project
|
||||
@setPath(path)
|
||||
@editSessions = []
|
||||
@buffers = []
|
||||
@ignoredNames = [
|
||||
'.git'
|
||||
'.DS_Store'
|
||||
]
|
||||
@repo = new Git(path)
|
||||
|
||||
destroy: ->
|
||||
@@ -59,7 +55,8 @@ class Project
|
||||
|
||||
isPathIgnored: (path) ->
|
||||
for segment in path.split("/")
|
||||
return true if _.contains(@ignoredNames, segment)
|
||||
ignoredNames = config.get("core.ignoredNames") or []
|
||||
return true if _.contains(ignoredNames, segment)
|
||||
|
||||
@ignoreRepositoryPath(path)
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ TextMateTheme = require 'text-mate-theme'
|
||||
module.exports =
|
||||
class RootView extends View
|
||||
@configDefaults:
|
||||
ignoredNames: [".git", ".svn", ".DS_Store"]
|
||||
extensions: []
|
||||
|
||||
@content: ->
|
||||
|
||||
Reference in New Issue
Block a user