Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global Search in Multiroot mode does not take into account the .gitignore file of each folder (project) #96511

Closed
chesucr opened this issue Apr 29, 2020 · 2 comments

Comments

@chesucr
Copy link

chesucr commented Apr 29, 2020

  • VSCode Version: 1.44.2
  • OS Version: Windows 10 Version 1909

Steps to Reproduce:

  1. Create a multiroot workspace
  2. Use a .gitignore file in one of the root folders which also is a git project
  3. In the search result, the ignored files are taken into account in the search

Does this issue occur when all extensions are disabled?: Yes

More details

If I open the project as one unique folder the .gitignore is taken into account. If I open in a multiroot mode, the folders are still grey, indicating they are ignored, but the search includes them anyway.

I include the following attribute to the user and project settings in order to use by default the .gitignore file to exclude the folder from the search. But it is not working either:

"search.useGlobalIgnoreFiles": true,

image

The expected result is this one (I have written the path to exclude manually):

image

Without the ./ of the beginning of the path I don't get the expected result either.

I have taken into account all the search options and the search in multiroot documentation

It is also possible that I am doing something wrong. I am not sure if I write a path to a folder, which is inside the project, in the "include" box it will include everything, folders in the .gitignore section as well. Because I have just found that if I write ./ocean-data-qc/**/*.js, it works as expected

@vscodebot
Copy link

vscodebot bot commented Apr 29, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@chesucr
Copy link
Author

chesucr commented Apr 29, 2020

Yes, vscodebot is right, it is a duplicated of the issue #26574. I close this one. Actually I don't include the folder which is ignored, I include the parent, but I am afraid it will point to the same reason.

@chesucr chesucr closed this as completed Apr 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jun 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant