Merge pull request #842 from AudriusButkevicius/ignorecache
Cache ignore file matches
This commit is contained in:
@@ -36,7 +36,7 @@ type Walker struct {
|
||||
// BlockSize controls the size of the block used when hashing.
|
||||
BlockSize int
|
||||
// List of patterns to ignore
|
||||
Ignores ignore.Patterns
|
||||
Ignores *ignore.Matcher
|
||||
// If TempNamer is not nil, it is used to ignore tempory files when walking.
|
||||
TempNamer TempNamer
|
||||
// If CurrentFiler is not nil, it is queried for the current file before rescanning.
|
||||
|
||||
@@ -58,7 +58,7 @@ func init() {
|
||||
}
|
||||
|
||||
func TestWalkSub(t *testing.T) {
|
||||
ignores, err := ignore.Load("testdata/.stignore")
|
||||
ignores, err := ignore.Load("testdata/.stignore", false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -93,7 +93,7 @@ func TestWalkSub(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestWalk(t *testing.T) {
|
||||
ignores, err := ignore.Load("testdata/.stignore")
|
||||
ignores, err := ignore.Load("testdata/.stignore", false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user