Skip to content

Commit 09f4114

Browse files
authored
fix: use matchBase option when match ignoreList (#1139)
1 parent e47cf90 commit 09f4114

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,7 @@
12921292
"examples": [
12931293
[
12941294
"**/*.js",
1295+
"*.jar",
12951296
"/log",
12961297
"/.vscode/*",
12971298
"!/.vscode/settings.json"

src/repository.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,10 @@ export class Repository implements IRemoteRepository {
585585
}
586586
if (
587587
ignoreList.length > 0 &&
588-
matchAll(path.sep + status.path, ignoreList, { dot: true })
588+
matchAll(path.sep + status.path, ignoreList, {
589+
dot: true,
590+
matchBase: true
591+
})
589592
) {
590593
continue;
591594
}

src/svnRepository.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,12 @@ export class Repository {
486486
(await readdir(file)).map(subfile => {
487487
const abspath = path.resolve(file + path.sep + subfile);
488488
const relpath = this.removeAbsolutePath(abspath);
489-
if (!matchAll(path.sep + relpath, ignoreList, { dot: true })) {
489+
if (
490+
!matchAll(path.sep + relpath, ignoreList, {
491+
dot: true,
492+
matchBase: true
493+
})
494+
) {
490495
return allFiles(abspath);
491496
}
492497
return [];

0 commit comments

Comments
 (0)