atom / find-and-replace

Find and replace in a single buffer and in the project
MIT License
242 stars 219 forks source link

VCS Ignored Paths included in multi-project search #508

Open justinaray opened 9 years ago

justinaray commented 9 years ago

When working in a multi-project environment, searches within a particular project/directory include ignored files (e.g. .gitignore).

I think this is an unintended side effect of allowing VCS Ignored paths to be searched when explicitly specifying a directory. (Perhaps this? https://github.com/atom/find-and-replace/issues/207)

Please excuse the Spam if this has been previously reported. I searched and took to slack to check that this wasn't a known or in-progress issue.

Pauan commented 9 years ago

I have this problem too.

To clarify, here is a screenshot: http://i.imgur.com/2z0NDh4.png

I have tab-organizer-es6 as a Git project in the tree view.

I have a tab-organizer-es6/.gitignore file which excludes tab-organizer-es6/node_modules. This works correctly in the tree view (node_modules is grayed out).

Because I have many projects open in the tree view, I search for the files inside of tab-organizer-es6.

I expect this to not include tab-organizer-es6/node_modules. But as you can see in the screenshot, it is included.

chrishiestand commented 8 years ago

Same issue here. I have atom.config.get('core.excludeVcsIgnoredPaths') -> true. It seems like find-and-replace is not recursively parsing .gitignore files. In other words, VcsIgnoredPaths is not feature complete with VCSs.

In my project folder I have these files, among others: .gitignore # contains no entry for build/ build/.gitignore

Inside of build/.gitignore is:

*
!.gitignore
!.npmignore

However all my build files are searched during a global find.

jfelixetcetera commented 8 years ago

Yeah, seems like find-and-replace is not multi-project aware. :(

dominicbarnes commented 8 years ago

+1

This issue can be a pain where something like node_modules (across 2 or 3 projects) could literally be thousands of files. I'm forced to open separate windows for performing any searches.

ghost commented 8 years ago

+1 it's crazy that this is not working as it's such a commonly used developer feature. Of course I have ignore VCS ticked in my preferences. I'm using a single .gitignore file and I've only got a single project directory loaded. I've tried the following ignore patterns in my .gitignore file (none work)

node_modules/
node_modules/**
.foo/
.foo/**

You can ignore stuff in config.cson as a workaround: https://github.com/atom/find-and-replace/issues/149

justinko commented 8 years ago

project-manager with node_modules forces me to quit atom after a search has had enough :(