file-search: fix not ignoring .git#8721
Merged
paul-marechal merged 1 commit intomasterfrom Nov 11, 2020
Merged
Conversation
2244ce8 to
cc1284c
Compare
c8df4d5 to
a5deff4
Compare
- Fix issue where ripgrep would look into `.git` when using `.gitignore`. - Use `files.exclude`. Signed-off-by: Paul Maréchal <paul.marechal@ericsson.com>
a5deff4 to
3071218
Compare
Member
Author
|
This issue apparently only occurred during tests, but it was failing on my side. Hence why I fixed the logic rather than just changing my environment. |
vince-fugnitto
approved these changes
Nov 10, 2020
Member
vince-fugnitto
left a comment
There was a problem hiding this comment.
The changes look good and work well 👍
I confirmed the following:
- the unit-test fails if the line is commented out/removed.
- the functionality still works correctly, searching for files work, and searching ignored files also work when requested.
- the only difference in behavior I could identify is that vscode respects the
files.excludepreference while we always exclude.git.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
.gitwhen using.gitignore.files.exclude.Signed-off-by: Paul Maréchal paul.marechal@ericsson.com
How to test
Tests should fail if you comment the line
args.push('--glob', '!.git');from the filefile-search-service-impl.ts.Review checklist
Reminder for reviewers