From cdfebe3f55dc53872079a96a9a5dd6970bc2980e Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 11 Jan 2026 18:43:56 +0700 Subject: lib/git: fix ignore pattern with single wildcard '*' Single wildcard should ignore everything inside it. --- lib/git/ignore_pattern_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/git/ignore_pattern_test.go') diff --git a/lib/git/ignore_pattern_test.go b/lib/git/ignore_pattern_test.go index 544cb0d8..ad1aeea7 100644 --- a/lib/git/ignore_pattern_test.go +++ b/lib/git/ignore_pattern_test.go @@ -44,33 +44,33 @@ func TestParsePattern(t *testing.T) { }, { pattern: `*`, exp: ignorePattern{ - pattern: nil, + pattern: regexp.MustCompile(`^/?.*$`), }, }, { pattern: `*/`, exp: ignorePattern{ - pattern: nil, + pattern: regexp.MustCompile(`^/?.*$`), isDir: true, }, }, { pattern: `**`, exp: ignorePattern{ - pattern: nil, + pattern: regexp.MustCompile(`^/?.*$`), }, }, { pattern: `***`, exp: ignorePattern{ - pattern: nil, + pattern: regexp.MustCompile(`^/?.*$`), }, }, { pattern: `**/**`, exp: ignorePattern{ - pattern: nil, + pattern: regexp.MustCompile(`^/?.*$`), }, }, { pattern: `**/**/`, exp: ignorePattern{ - pattern: nil, + pattern: regexp.MustCompile(`^/?.*$`), isDir: true, }, }, { -- cgit v1.3