Пример #1
0
func (sub *Submodule) Init(overwrite bool) error {
	ret := C.git_submodule_init(sub.ptr, cbool(overwrite))
	if ret < 0 {
		return LastError()
	}
	return nil
}
Пример #2
0
func (sub *Submodule) Init(overwrite bool) error {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	ret := C.git_submodule_init(sub.ptr, cbool(overwrite))
	if ret < 0 {
		return MakeGitError(ret)
	}
	return nil
}