MCPcopy Create free account
hub / github.com/go-git/go-git / Commit

Method Commit

storage/memory/storage.go:230–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228}
229
230func (tx *TxObjectStorage) Commit() error {
231 for h, obj := range tx.Objects {
232 delete(tx.Objects, h)
233 if _, err := tx.Storage.SetEncodedObject(obj); err != nil {
234 return err
235 }
236 }
237
238 return nil
239}
240
241func (tx *TxObjectStorage) Rollback() error {
242 tx.Objects = make(map[plumbing.Hash]plumbing.EncodedObject)

Callers

nothing calls this directly

Calls 1

SetEncodedObjectMethod · 0.65

Tested by

no test coverage detected