Closed sebastianrath closed 2 years ago
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/ignore.ts | 16 | 23 | 69.57% | ||
<!-- | Total: | 39 | 46 | 84.78% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
src/odb.ts | 4 | 93.3% | ||
src/io.ts | 6 | 85.0% | ||
src/repository.ts | 47 | 86.71% | ||
<!-- | Total: | 57 | --> |
Totals | |
---|---|
Change from base Build 2164716031: | 3.7% |
Covered Lines: | 1839 |
Relevant Lines: | 2118 |
Awesome! LGTM ❤️ 🚀
This PR brings
.snowignore
closer to.gitignore
with improvements (see Negate below).I tried many pattern matchers and micromatch is still the fastest, most feature complete and closest to
.gitignore
(with exceptions). Pattern matcher comparison table: https://github.com/micromatch/picomatch#library-comparisonsI disabled several features of
micromatch
as their future support by us is uncertain. Pattern features that are enabled for internal reasons are not covered and might break in the future. This PR description defines the supported patterns that we aim to support in future versions.Supported Patterns
tex
bas
abc/tex
assets/tex
assets/test/abc.jpg
tex
bas
a/assets/b
a/b/c/assets
baz/abc
aassets
assetsb
aassetsb
a-assets
assets-b
a-assets-b
a/b/c/assets.jpg
assets/tex/baz
x/assets/tex
x/assets/tex/baz
tex/assets
.mov
abc.jpg
assets/tex.jpg
assets/tex/bas.jpg
abc.mov
assets/tex.mov
assets/tex.mov/xyz
assets/tex/bas.mov
jpg.
assets.jpg.abc
assets/jpg.
assets/tex/jpg.baz
assets/tex.jpg.abc
assets/tex/bas.jpg.abc
!important.log
trace.log
assets/test.log
assets/log.log
logs/important.log
tex.
pic.jpg
pic.jpg.abc
assets/pic.jpg
assets/pic.jpg.abc
assets/baz/pic.jpg
assets/baz/pic.jpg.abc
assets/tex.xyz
assets/tex.baz/xyz
assets.pic
assets/tex/bas.pic
!assets/tex/bas
assets/tex
assets/tex/baz
x/assets
x/assets/tex
x/assets/tex/baz
tex
tex/bas
!assets//bas/a
assets/tex/bas/b
assets/tex/bas/c
assets/tex/bas/a
assets/tex/bas/b
assets/
assets/tex
assets/tex/
assets/tex/bas
assetso/
assetso/tex
x/assets
x/assets/
x/assets/tex
x/assets/tex/bas
assets/
assets/tex
assets/tex/
assets/tex/bas
assetso/
assetso/tex
x/assets
x/assets/
x/assets/tex
x/assets/tex/bas
assets/
assets/tex
assets/tex/
assets/tex/bas
assetso/
assetso/tex
x/assets
x/assets/
x/assets/tex
x/assets/tex/bas
build/logs/debug.log
logs/debug.log
file-log
log/logs.txt
build/logs/debug.log
assets/tex/
assets/tex/bas
assetso/
assetso/tex
x/assets
x/assets/
x/assets/tex
x/assets/tex/bas
assets/tex/
assets/tex/bas
assetso/
assetso/tex
x/assets
x/assets/
x/assets/tex
x/assets/tex/bas
assets/tex/
assets/tex/bas
assetso/
assetso/tex
x/assets
x/assets/
x/assets/tex
x/assets/tex/bas
x/assets/tex/baz
x/assets/tex/baz/y
assets/tex
assets/baz
x/assets/tex/baz
x/assets/tex/baz/y
assets/tex
assets/baz
x/assets/tex/baz
x/assets/tex/baz/y
assets/tex
assets/baz
debug1.log
assets/debug0.log
assets/debug1.log
debug01.log
assets/debug2.log
assets/debug01.log
debugg.log
assets/debugg.log
assets/tex2.jpg
assets/tex3.jpg
assets/tex4.jpg
assets/tex5.jpg
assets/tex6.jpg
assets/tex7.jpg
assets/tex8.jpg
assets/tex11.jpg
tex1.jpg
tex11.jpg
Negate
The nain difference between
.gitignore
is the way how negatives are handled. They are more complicated in Git as you need to exclude the parent directory first. This is not needed with.snowignore
.For more information check this SO question. From the gitignore documentation: