mirror of
https://github.com/moby/buildkit.git
synced 2026-08-09 09:11:45 +00:00
This breaks the giant blob that was the diffApply function into two separate parts, a differ and an applier, which results in more modular code that should be easier to follow and easier to make any future updates to. For example, if we want to optimize by allowing differ and applier to run in parallel in the future, that's straightforward now. There are also some fixes that weren't needed for MergeOp, but will be for DiffOp, such as correctly handling the case where a deletion is applied that is under parent directories which don't exist yet (the correct behavior is, surprisingly, to create the parent directories as that is what the image import/export code ends up doing). Signed-off-by: Erik Sipsma <erik@sipsma.dev>
21 lines
565 B
Go
21 lines
565 B
Go
//go:build windows
|
|
// +build windows
|
|
|
|
package snapshot
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/containerd/containerd/leases"
|
|
"github.com/containerd/containerd/snapshots"
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
func (sn *mergeSnapshotter) diffApply(ctx context.Context, dest Mountable, diffs ...Diff) (_ snapshots.Usage, rerr error) {
|
|
return snapshots.Usage{}, errors.New("diffApply not yet supported on windows")
|
|
}
|
|
|
|
func needsUserXAttr(ctx context.Context, sn Snapshotter, lm leases.Manager) (bool, error) {
|
|
return false, errors.New("needs userxattr not supported on windows")
|
|
}
|