MCPcopy Index your code
hub / github.com/go-git/go-git / Commit

Method Commit

storage/memory/storage.go:234–243  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

SetEncodedObjectMethod · 0.65

Tested by

no test coverage detected