diff --git a/pkg/snapshot/layered_map.go b/pkg/snapshot/layered_map.go index 16d9e36e14..d7d4e1b3ed 100644 --- a/pkg/snapshot/layered_map.go +++ b/pkg/snapshot/layered_map.go @@ -48,14 +48,13 @@ func NewLayeredMap(h func(string) (string, error), c func(string) (string, error func (l *LayeredMap) Snapshot() { l.whiteouts = append(l.whiteouts, map[string]string{}) l.layers = append(l.layers, map[string]string{}) - l.added = append(l.added, map[string]string{}) } // Key returns a hash for added files func (l *LayeredMap) Key() (string, error) { c := bytes.NewBuffer([]byte{}) enc := json.NewEncoder(c) - enc.Encode(l.added) + enc.Encode(l.layers) return util.SHA256(c) } @@ -110,12 +109,6 @@ func (l *LayeredMap) Add(s string) error { return fmt.Errorf("Error creating hash for %s: %v", s, err) } l.layers[len(l.layers)-1][s] = newV - // Use cache hash function and add to added - cacheV, err := l.cacheHasher(s) - if err != nil { - return fmt.Errorf("Error creating cache hash for %s: %v", s, err) - } - l.added[len(l.added)-1][s] = cacheV return nil }