Пример #1
0
func (c *SubmoduleCollection) SetUpdate(submodule string, update SubmoduleUpdate) error {
	csubmodule := C.CString(submodule)
	defer C.free(unsafe.Pointer(csubmodule))

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	ret := C.git_submodule_set_update(c.repo.ptr, csubmodule, C.git_submodule_update_t(update))
	if ret < 0 {
		return MakeGitError(ret)
	}

	return nil
}
Пример #2
0
func (sub *Submodule) SetUpdate(update SubmoduleUpdate) SubmoduleUpdate {
	o := C.git_submodule_set_update(sub.ptr, C.git_submodule_update_t(update))
	return SubmoduleUpdate(o)
}