From 7b4a8379327653167e87e9e46a2d397f8fd9cfc8 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Sun, 19 Aug 2018 11:51:21 -0400 Subject: Fixed an edge case for .gitignore Fixes #923 Signed-off-by: Fedor Korotkov --- plumbing/format/gitignore/pattern_test.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plumbing/format/gitignore/pattern_test.go') diff --git a/plumbing/format/gitignore/pattern_test.go b/plumbing/format/gitignore/pattern_test.go index f94cef3..c410442 100644 --- a/plumbing/format/gitignore/pattern_test.go +++ b/plumbing/format/gitignore/pattern_test.go @@ -281,3 +281,9 @@ func (s *PatternSuite) TestGlobMatch_wrongPattern_onTraversal_mismatch(c *C) { r := p.Match([]string{"value", "head", "vol["}, false) c.Assert(r, Equals, NoMatch) } + +func (s *PatternSuite) TestGlobMatch_issue_923(c *C) { + p := ParsePattern("**/android/**/GeneratedPluginRegistrant.java", nil) + r := p.Match([]string{"packages", "flutter_tools", "lib", "src", "android", "gradle.dart"}, false) + c.Assert(r, Equals, NoMatch) +} -- cgit