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: use matchBase option when match ignoreList #1139

Merged
merged 3 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@
"default": [],
"examples": [
[
"**/*.js",
"*.js",
JohnstonCode marked this conversation as resolved.
Show resolved Hide resolved
"/log",
"/.vscode/*",
"!/.vscode/settings.json"
Expand Down
5 changes: 4 additions & 1 deletion src/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,10 @@ export class Repository implements IRemoteRepository {
}
if (
ignoreList.length > 0 &&
matchAll(path.sep + status.path, ignoreList, { dot: true })
matchAll(path.sep + status.path, ignoreList, {
dot: true,
matchBase: true
})
) {
continue;
}
Expand Down
7 changes: 6 additions & 1 deletion src/svnRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,12 @@ export class Repository {
(await readdir(file)).map(subfile => {
const abspath = path.resolve(file + path.sep + subfile);
const relpath = this.removeAbsolutePath(abspath);
if (!matchAll(path.sep + relpath, ignoreList, { dot: true })) {
if (
!matchAll(path.sep + relpath, ignoreList, {
dot: true,
matchBase: true
})
) {
return allFiles(abspath);
}
return [];
Expand Down