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

Method Index

repository.go:188–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186}
187
188func (v *Repository) Index() (*Index, error) {
189 var ptr *C.git_index
190
191 runtime.LockOSThread()
192 defer runtime.UnlockOSThread()
193
194 ret := C.git_repository_index(&ptr, v.ptr)
195 if ret < 0 {
196 return nil, MakeGitError(ret)
197 }
198
199 return newIndexFromC(ptr, v), nil
200}
201
202func (v *Repository) lookupType(id *Oid, t ObjectType) (*Object, error) {
203 var ptr *C.git_object

Callers 15

TestPatchFunction · 0.45
TestCreateCommitBufferFunction · 0.45
TestCreateCommitFromIdsFunction · 0.45
TestRepositorySetConfigFunction · 0.45
prepareStashRepoFunction · 0.45
seedTestRepoOptFunction · 0.45
updateReadmeFunction · 0.45
TestApplyDiffAddfileFunction · 0.45
addAndGetTreeFunction · 0.45
TestReferenceIteratorFunction · 0.45
TestCreateRepoAndStageFunction · 0.45
TestIndexAddFromBufferFunction · 0.45

Calls 2

MakeGitErrorFunction · 0.85
newIndexFromCFunction · 0.85

Tested by 15

TestPatchFunction · 0.36
TestCreateCommitBufferFunction · 0.36
TestCreateCommitFromIdsFunction · 0.36
TestRepositorySetConfigFunction · 0.36
prepareStashRepoFunction · 0.36
seedTestRepoOptFunction · 0.36
updateReadmeFunction · 0.36
TestApplyDiffAddfileFunction · 0.36
addAndGetTreeFunction · 0.36
TestReferenceIteratorFunction · 0.36
TestCreateRepoAndStageFunction · 0.36
TestIndexAddFromBufferFunction · 0.36