-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix wildcard expansion when includes is empty and excludes has wildcards #9684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e652c5a
aedb52d
f75da02
94c8622
3c4bfee
aa0a620
fa6d949
16d956e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix wildcard expansion when includes is empty and excludes has wildcards |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,11 @@ import ( | |
| ) | ||
|
|
||
| func ShouldExpandWildcards(includes []string, excludes []string) bool { | ||
| // Empty includes is equivalent to * (match all) - don't expand | ||
| if len(includes) == 0 { | ||
| return false | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fix is reasonable for the main branch now, but release-1.18 expands asterisk.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will backport to release-1.18 branch |
||
| } | ||
|
|
||
| wildcardFound := false | ||
| for _, include := range includes { | ||
| // Special case: "*" alone means "match all" - don't expand | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.