-
Notifications
You must be signed in to change notification settings - Fork 494
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
fix: Fix externals not being ignored by .chezmoiignore #3197
fix: Fix externals not being ignored by .chezmoiignore #3197
Conversation
Tests failing due to changed patterns, need help in adjusting them, as I don't see through which one exactly has failed |
1c966cb
to
e7aa663
Compare
internal/chezmoi/sourcestate.go
Outdated
@@ -1403,6 +1403,9 @@ func (s *SourceState) addPatterns( | |||
include = patternSetExclude | |||
} | |||
pattern := dir.JoinString(text).String() | |||
if !strings.HasSuffix(pattern, "/**") { | |||
pattern = pattern + "/**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this fix is appropriate (if no better solution exists) we might discuss where to put this pattern extension (/**
).
It can be put either here, only being applying on source state reads or directly into patternset.go#Match
effecting all dependent "packages".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually prefer to put it into patternset.go#Match
as the behavior of doublestar
is strange and unexpected for ignoring files (.config/i3
does not match .config/i3/theme.conf
)
Your force-push didn't change anything, did you forget to commit? The linter wants |
This change is not correct. chezmoi explicitly treats the patterns |
e7aa663
to
ae55c1e
Compare
I saw the issue. It is not a bug. This change will break everybody who relies on chezmoi's existing behavior. |
Then this can be closed |
fixes #3196