"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/github.com/moby/buildkit/cache/contenthash/checksum.go" between
moby-20.10.6.tar.gz and moby-20.10.7.tar.gz

About: Moby is a framework to assemble specialized container systems (formerly project name Docker; see here to clarify the relationship between the projects).

checksum.go  (moby-20.10.6):checksum.go  (moby-20.10.7)
skipping to change at line 409 skipping to change at line 409
return "", err return "", err
} }
wildcards[i].Record = &CacheRecord{Digest: dgst} wildcards[i].Record = &CacheRecord{Digest: dgst}
} }
} }
} }
if len(wildcards) == 0 { if len(wildcards) == 0 {
return digest.FromBytes([]byte{}), nil return digest.FromBytes([]byte{}), nil
} }
if len(wildcards) > 1 { if len(wildcards) == 1 && path.Base(p) == path.Base(wildcards[0].Path) {
digester := digest.Canonical.Digester() return wildcards[0].Record.Digest, nil
for i, w := range wildcards { }
if i != 0 {
digester.Hash().Write([]byte{0}) digester := digest.Canonical.Digester()
} for i, w := range wildcards {
digester.Hash().Write([]byte(w.Record.Digest)) if i != 0 {
digester.Hash().Write([]byte{0})
} }
return digester.Digest(), nil digester.Hash().Write([]byte(path.Base(w.Path)))
digester.Hash().Write([]byte(w.Record.Digest))
} }
return wildcards[0].Record.Digest, nil return digester.Digest(), nil
} }
func (cc *cacheContext) Checksum(ctx context.Context, mountable cache.Mountable, p string, followLinks bool, s session.Group) (digest.Digest, error) { func (cc *cacheContext) Checksum(ctx context.Context, mountable cache.Mountable, p string, followLinks bool, s session.Group) (digest.Digest, error) {
m := &mount{mountable: mountable, session: s} m := &mount{mountable: mountable, session: s}
defer m.clean() defer m.clean()
return cc.checksumFollow(ctx, m, p, followLinks) return cc.checksumFollow(ctx, m, p, followLinks)
} }
func (cc *cacheContext) checksumFollow(ctx context.Context, m *mount, p string, follow bool) (digest.Digest, error) { func (cc *cacheContext) checksumFollow(ctx context.Context, m *mount, p string, follow bool) (digest.Digest, error) {
 End of changes. 3 change blocks. 
9 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)