summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2021-04-16 11:01:11 -0400
committerMatthew Heon <mheon@redhat.com>2021-04-19 09:17:04 -0400
commitdb21c1c0ea73d72b7160d1ba75a144a5b5e44a8e (patch)
tree15500f05f2bbd4feaa1c9dfa9c05cb6dc5232448
parent382b5b81d24870abe400d14296e4f5ef47c99d29 (diff)
downloadpodman-db21c1c0ea73d72b7160d1ba75a144a5b5e44a8e.tar.gz
podman-db21c1c0ea73d72b7160d1ba75a144a5b5e44a8e.tar.bz2
podman-db21c1c0ea73d72b7160d1ba75a144a5b5e44a8e.zip
Remove an advanced layer diff function
Noticed this while I was poking around in the runtime doing DB work. The signature of this function makes me a bit uncomfortable (why should we let people apply arbitrary diffs to layers? Seems like a good way to break things...) and it's completely unused, so let's just remove it. [NO TESTS NEEDED] since this is a pure removal. Signed-off-by: Matthew Heon <mheon@redhat.com>
-rw-r--r--libpod/diff.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/libpod/diff.go b/libpod/diff.go
index 36d60b838..df1acf4bb 100644
--- a/libpod/diff.go
+++ b/libpod/diff.go
@@ -1,8 +1,6 @@
package libpod
import (
- "io"
-
"github.com/containers/podman/v3/libpod/layers"
"github.com/containers/storage/pkg/archive"
"github.com/pkg/errors"
@@ -46,16 +44,6 @@ func (r *Runtime) GetDiff(from, to string) ([]archive.Change, error) {
return rchanges, err
}
-// ApplyDiffTarStream applies the changes stored in 'diff' to the layer 'to'
-func (r *Runtime) ApplyDiffTarStream(to string, diff io.Reader) error {
- toLayer, err := r.getLayerID(to)
- if err != nil {
- return err
- }
- _, err = r.store.ApplyDiff(toLayer, diff)
- return err
-}
-
// GetLayerID gets a full layer id given a full or partial id
// If the id matches a container or image, the id of the top layer is returned
// If the id matches a layer, the top layer id is returned