From dcdad6aed7e84afba4552a475ee7de5b0b37c8c8 Mon Sep 17 00:00:00 2001 From: "Samuel E. Giddins" Date: Sat, 30 May 2015 12:57:45 -0700 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20not=20ignoring=20nes?= =?UTF-8?q?ted=20git=20repositories?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For example, suppose you have a repo, `Rainforest`, whose .gitignore is simply `*`. Inside Rainforest is another git repo, `Repo`. If you open `Repo` as your project directory, it will now be auto-completed, as the root is no longer considered ignored. --- lib/load-paths-handler.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/load-paths-handler.coffee b/lib/load-paths-handler.coffee index 9d29a2a3..a899f51d 100644 --- a/lib/load-paths-handler.coffee +++ b/lib/load-paths-handler.coffee @@ -26,7 +26,7 @@ class PathLoader isIgnored: (loadedPath) -> relativePath = path.relative(@rootPath, loadedPath) - if @repo?.isPathIgnored(relativePath) + if @repo?.isPathIgnored(loadedPath) true else for ignoredName in @ignoredNames From 088c0e733bfd546f62715b847b6fed4808b8ee6f Mon Sep 17 00:00:00 2001 From: "Samuel E. Giddins" Date: Fri, 5 Jun 2015 11:59:32 -0700 Subject: [PATCH 2/2] Don't ignore the root path --- lib/load-paths-handler.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/load-paths-handler.coffee b/lib/load-paths-handler.coffee index a899f51d..cfe98d2e 100644 --- a/lib/load-paths-handler.coffee +++ b/lib/load-paths-handler.coffee @@ -26,7 +26,9 @@ class PathLoader isIgnored: (loadedPath) -> relativePath = path.relative(@rootPath, loadedPath) - if @repo?.isPathIgnored(loadedPath) + if relativePath is '' + false + else if @repo?.isPathIgnored(loadedPath) true else for ignoredName in @ignoredNames