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

Method Open

submodule.go:354–365  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

352}
353
354func (sub *Submodule) Open() (*Repository, error) {
355 runtime.LockOSThread()
356 defer runtime.UnlockOSThread()
357
358 var ptr *C.git_repository
359 ret := C.git_submodule_open(&ptr, sub.ptr)
360 runtime.KeepAlive(sub)
361 if ret < 0 {
362 return nil, MakeGitError(ret)
363 }
364 return newRepositoryFromC(ptr), nil
365}
366
367func (sub *Submodule) Update(init bool, opts *SubmoduleUpdateOptions) error {
368 var err error

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
newRepositoryFromCFunction · 0.85

Tested by

no test coverage detected