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

Method SetUrl

submodule.go:220–235  ·  view source on GitHub ↗
(submodule, url string)

Source from the content-addressed store, hash-verified

218}
219
220func (c *SubmoduleCollection) SetUrl(submodule, url string) error {
221 csubmodule := C.CString(submodule)
222 defer C.free(unsafe.Pointer(csubmodule))
223 curl := C.CString(url)
224 defer C.free(unsafe.Pointer(curl))
225
226 runtime.LockOSThread()
227 defer runtime.UnlockOSThread()
228
229 ret := C.git_submodule_set_url(c.repo.ptr, csubmodule, curl)
230 runtime.KeepAlive(c)
231 if ret < 0 {
232 return MakeGitError(ret)
233 }
234 return nil
235}
236
237func (sub *Submodule) IndexId() *Oid {
238 var id *Oid

Callers

nothing calls this directly

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by

no test coverage detected