Commit it copies the objects of the temporal storage into the base storage.
()
| 72 | |
| 73 | // Commit it copies the objects of the temporal storage into the base storage. |
| 74 | func (o *ObjectStorage) Commit() error { |
| 75 | iter, err := o.temporal.IterEncodedObjects(plumbing.AnyObject) |
| 76 | if err != nil { |
| 77 | return err |
| 78 | } |
| 79 | |
| 80 | return iter.ForEach(func(obj plumbing.EncodedObject) error { |
| 81 | _, err := o.EncodedObjectStorer.SetEncodedObject(obj) |
| 82 | return err |
| 83 | }) |
| 84 | } |
| 85 | |
| 86 | func (o *ObjectStorage) AddAlternate(remote string) error { |
| 87 | return o.temporal.AddAlternate(remote) |