Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Plugin globs do not respect .gitignore #14

Open
nathankleyn opened this issue Sep 22, 2015 · 1 comment
Open

Plugin globs do not respect .gitignore #14

nathankleyn opened this issue Sep 22, 2015 · 1 comment
Labels

Comments

@nathankleyn
Copy link
Contributor

Currently, any globs specified in a plugin traverse into directories that are excluded by .gitignore files. This can lead to massive slowdowns, especially when deeply nested build folders are concerned.

As an example, consider the following .gitignore file:

build

Imagine this directory contains lots of files called foo in a deeply nested structure beneath it. Now imagine the following plugin:

class TestPlugin < Plugin
  projects '**/foo'
end

Despite the intentions of the repository owner, this plugin would locate the foo files stored in the build folder even though they are clearly not intended to be treated as projects. In addition, this would be potentially massively slower as we are traversing into an entire directory needlessly.

Given this, we should have some way of respecting .gitignore rules when executing globs for any reason.

@nathankleyn
Copy link
Contributor Author

This will share the same solution as #13, which is to use a project I've been working on at nathankleyn/gitignore.rb. This allows us to get back just the tree of files that are not ignored upon which globs can be executed without touching the disk again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant