Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions session/filesync/diffcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import (
"google.golang.org/grpc"
)

func sendDiffCopy(stream grpc.Stream, dir string, includes, excludes []string, progress progressCb) error {
func sendDiffCopy(stream grpc.Stream, dir string, includes, excludes []string, progress progressCb, _map func(*fsutil.Stat) bool) error {
return fsutil.Send(stream.Context(), stream, dir, &fsutil.WalkOpt{
ExcludePatterns: excludes,
IncludePaths: includes, // TODO: rename IncludePatterns
IncludePatterns: includes,
Map: _map,
}, progress)
}

Expand Down
7 changes: 4 additions & 3 deletions session/filesync/filesync.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type SyncedDir struct {
Name string
Dir string
Excludes []string
Map func(*fsutil.Stat) bool
}

// NewFSSyncProvider creates a new provider for sending files from client
Expand Down Expand Up @@ -94,7 +95,7 @@ func (sp *fsSyncProvider) handle(method string, stream grpc.ServerStream) error
doneCh = sp.doneCh
sp.doneCh = nil
}
err := pr.sendFn(stream, dir.Dir, includes, excludes, progress)
err := pr.sendFn(stream, dir.Dir, includes, excludes, progress, dir.Map)
if doneCh != nil {
if err != nil {
doneCh <- err
Expand All @@ -113,7 +114,7 @@ type progressCb func(int, bool)

type protocol struct {
name string
sendFn func(stream grpc.Stream, srcDir string, includes, excludes []string, progress progressCb) error
sendFn func(stream grpc.Stream, srcDir string, includes, excludes []string, progress progressCb, _map func(*fsutil.Stat) bool) error
recvFn func(stream grpc.Stream, destDir string, cu CacheUpdater, progress progressCb) error
}

Expand Down Expand Up @@ -236,5 +237,5 @@ func CopyToCaller(ctx context.Context, srcPath string, c session.Caller, progres
return err
}

return sendDiffCopy(cc, srcPath, nil, nil, progress)
return sendDiffCopy(cc, srcPath, nil, nil, progress, nil)
}
2 changes: 1 addition & 1 deletion vendor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ github.com/BurntSushi/locker 392720b78f44e9d0249fcac6c43b111b47a370b8
github.com/docker/docker 6f723db8c6f0c7f0b252674a9673a25b5978db04 https://github.com/tonistiigi/docker.git
github.com/pkg/profile 5b67d428864e92711fcbd2f8629456121a56d91f

github.com/tonistiigi/fsutil d49833a9a6fa5b41f63e7e338038633d10276b57
github.com/tonistiigi/fsutil 1dedf6e90084bd88c4c518a15e68a37ed1370203
github.com/stevvooe/continuity 86cec1535a968310e7532819f699ff2830ed7463
github.com/dmcgowan/go-tar 2e2c51242e8993c50445dab7c03c8e7febddd0cf
github.com/hashicorp/go-immutable-radix 826af9ccf0feeee615d546d69b11f8e98da8c8f1 git://github.com/tonistiigi/go-immutable-radix.git
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.