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

Method AddToIndex

submodule.go:190–200  ·  view source on GitHub ↗
(write_index bool)

Source from the content-addressed store, hash-verified

188}
189
190func (sub *Submodule) AddToIndex(write_index bool) error {
191 runtime.LockOSThread()
192 defer runtime.UnlockOSThread()
193
194 ret := C.git_submodule_add_to_index(sub.ptr, cbool(write_index))
195 runtime.KeepAlive(sub)
196 if ret < 0 {
197 return MakeGitError(ret)
198 }
199 return nil
200}
201
202func (sub *Submodule) Name() string {
203 n := C.GoString(C.git_submodule_name(sub.ptr))

Callers

nothing calls this directly

Calls 2

cboolFunction · 0.85
MakeGitErrorFunction · 0.85

Tested by

no test coverage detected