content: add Walk method to content store
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
8a36e1c6d1
commit
47f8b25d25
3 changed files with 126 additions and 9 deletions
|
@ -60,7 +60,9 @@ func (cw *ContentWriter) Commit(size int64, expected digest.Digest) error {
|
|||
}
|
||||
|
||||
dgst := cw.digester.Digest()
|
||||
if expected != dgst {
|
||||
// TODO(stevvooe): Correctly handle missing expected digest or allow no
|
||||
// expected digest at commit time.
|
||||
if expected != "" && expected != dgst {
|
||||
return errors.Errorf("unexpected digest: %v != %v", dgst, expected)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue