MCPcopy Create free account
hub / github.com/libgit2/git2go / WriteTree

Method WriteTree

index.go:419–432  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

417}
418
419func (v *Index) WriteTree() (*Oid, error) {
420 oid := new(Oid)
421
422 runtime.LockOSThread()
423 defer runtime.UnlockOSThread()
424
425 ret := C.git_index_write_tree(oid.toC(), v.ptr)
426 runtime.KeepAlive(v)
427 if ret < 0 {
428 return nil, MakeGitError(ret)
429 }
430
431 return oid, nil
432}
433
434func (v *Index) Write() error {
435 runtime.LockOSThread()

Callers 9

TestCreateCommitBufferFunction · 0.80
TestCreateCommitFromIdsFunction · 0.80
TestRepositorySetConfigFunction · 0.80
prepareStashRepoFunction · 0.80
seedTestRepoOptFunction · 0.80
updateReadmeFunction · 0.80
TestReferenceIteratorFunction · 0.80
TestCreateRepoAndStageFunction · 0.80
appendCommitFunction · 0.80

Calls 2

MakeGitErrorFunction · 0.85
toCMethod · 0.45

Tested by 9

TestCreateCommitBufferFunction · 0.64
TestCreateCommitFromIdsFunction · 0.64
TestRepositorySetConfigFunction · 0.64
prepareStashRepoFunction · 0.64
seedTestRepoOptFunction · 0.64
updateReadmeFunction · 0.64
TestReferenceIteratorFunction · 0.64
TestCreateRepoAndStageFunction · 0.64
appendCommitFunction · 0.64