Skip to content

Commit 62b5f78

Browse files
iggymilas
authored andcommitted
Add .kate-swp files to ignore pattern (docker#3380)
KDE's text editor, kate, uses a file similar to Vim's .swp files. Ignore these files so we don't rebuild on every keypress. Fixes docker#3378
1 parent 3f526c5 commit 62b5f78

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/watch/ephemeral.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,16 @@ func initEphemeralPathMatcher() model.PathMatcher {
2525
// ignoring .sw? seems dangerous, since things like .swf or .swi exist, but ignoring the first few
2626
// seems safe and should catch most cases
2727
vimPatterns := []string{"**/4913", "**/*~", "**/.*.swp", "**/.*.swx", "**/.*.swo", "**/.*.swn"}
28+
// kate (the default text editor for KDE) uses a file similar to Vim's .swp
29+
// files, but it doesn't have the "incrememnting" character problem mentioned
30+
// above
31+
katePatterns := []string{"**/.*.kate-swp"}
2832

2933
allPatterns := []string{}
3034
allPatterns = append(allPatterns, golandPatterns...)
3135
allPatterns = append(allPatterns, emacsPatterns...)
3236
allPatterns = append(allPatterns, vimPatterns...)
37+
allPatterns = append(allPatterns, katePatterns...)
3338

3439
matcher, err := dockerignore.NewDockerPatternMatcher("/", allPatterns)
3540
if err != nil {

0 commit comments

Comments
 (0)