aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/gitignore/dir.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/format/gitignore/dir.go')
-rw-r--r--plumbing/format/gitignore/dir.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/plumbing/format/gitignore/dir.go b/plumbing/format/gitignore/dir.go
index aca5d0d..92df5a3 100644
--- a/plumbing/format/gitignore/dir.go
+++ b/plumbing/format/gitignore/dir.go
@@ -64,6 +64,10 @@ func ReadPatterns(fs billy.Filesystem, path []string) (ps []Pattern, err error)
for _, fi := range fis {
if fi.IsDir() && fi.Name() != gitDir {
+ if NewMatcher(ps).Match(append(path, fi.Name()), true) {
+ continue
+ }
+
var subps []Pattern
subps, err = ReadPatterns(fs, append(path, fi.Name()))
if err != nil {