Skip to content

Fix explorer.excludeGitIgnore exclusion bug#160611

Merged
lramos15 merged 2 commits intomicrosoft:mainfrom
MonadChains:issue-151693/gitignore-exclusion-bug
Sep 12, 2022
Merged

Fix explorer.excludeGitIgnore exclusion bug#160611
lramos15 merged 2 commits intomicrosoft:mainfrom
MonadChains:issue-151693/gitignore-exclusion-bug

Conversation

@MonadChains
Copy link
Contributor

This solves #151693

The issue was laying in:

private gitignoreLineToGlob(line: string, dirPath: string): string {
const firstSep = line.indexOf('/');
if (firstSep === -1 || firstSep === line.length - 1) {
line = '**/' + line;
} else {
if (firstSep === 0) {
line = line.slice(1);
}
line = dirPath + line;
}
return line;
}
}

It produced path without a final '/' like: /home/monadchains/Documents/Contributions/vscode/playground/gh151693-take2/my-appnode_modules instead of /home/monadchains/Documents/Contributions/vscode/playground/gh151693-take2/my-app/node_modules

The new behaviour for node_modules is:
node-example

While for .yarn, the new behaviour is:
yarn-example

@lramos15 lramos15 added this to the September 2022 milestone Sep 12, 2022
@lramos15
Copy link
Member

Thanks for the contribution, it will be released in tomorrow's insiders.

@lramos15 lramos15 merged commit 32579e9 into microsoft:main Sep 12, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants