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

fix(vcs): no files were found when dotIgnoreFiles was set to empty list #1260

Merged
merged 2 commits into from
Oct 11, 2019

Conversation

edvald
Copy link
Collaborator

@edvald edvald commented Oct 10, 2019

What this PR does / why we need it:

If you set dotIgnoreFiles: [] in your project config, no modules would be found.

Which issue(s) this PR fixes:

Just came across this myself.

@@ -166,16 +166,20 @@ export class GitHandler extends VcsHandler {
// We push to the output array when all ls-files commands "agree" that it should be included,
// and it passes through the include/exclude filters.
if (
paths[resolvedPath] === this.ignoreFiles.length
paths[resolvedPath] >= this.ignoreFiles.length
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise the fix doesn't work when there are no ignore files, since the count (1) is higher than the number of ignore files (0).

@eysi09 eysi09 merged commit 920302e into master Oct 11, 2019
@eysi09 eysi09 deleted the fix-empty-dotignores branch October 11, 2019 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants