aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/gitignore/pattern.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/format/gitignore/pattern.go')
-rw-r--r--plumbing/format/gitignore/pattern.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/plumbing/format/gitignore/pattern.go b/plumbing/format/gitignore/pattern.go
index 2603352..098cb50 100644
--- a/plumbing/format/gitignore/pattern.go
+++ b/plumbing/format/gitignore/pattern.go
@@ -133,6 +133,9 @@ func (p *pattern) globMatch(path []string, isDir bool) bool {
} else if match {
matched = true
break
+ } else if len(path) == 0 {
+ // if nothing left then fail
+ matched = false
}
}
} else {