MCPcopy Index your code
hub / github.com/dagger/dagger / changes

Function changes

toolchains/engine-dev/main.go:403–413  ·  view source on GitHub ↗

Return the changes between two directory, excluding the specified path patterns from the comparison FIXME: had to copy-paste across modules

(before, after *dagger.Directory, exclude []string)

Source from the content-addressed store, hash-verified

401// Return the changes between two directory, excluding the specified path patterns from the comparison
402// FIXME: had to copy-paste across modules
403func changes(before, after *dagger.Directory, exclude []string) *dagger.Changeset {
404 if exclude == nil {
405 return after.Changes(before)
406 }
407 return after.
408 // 1. Remove matching files from after
409 Filter(dagger.DirectoryFilterOpts{Exclude: exclude}).
410 // 2. Copy matching files from before
411 WithDirectory("", before.Filter(dagger.DirectoryFilterOpts{Include: exclude})).
412 Changes(before)
413}
414
415var targets = []struct {
416 Name string

Callers 1

GenerateMethod · 0.70

Calls 3

ChangesMethod · 0.45
WithDirectoryMethod · 0.45
FilterMethod · 0.45

Tested by

no test coverage detected