Added force argument for (*Submodule).Reload() and (*Repository).ReloadAllSubmodules() #74
|
@ -287,22 +287,22 @@ func (sub *Submodule) Open() (*Repository, error) {
|
||||||
return repo, nil
|
return repo, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sub *Submodule) Reload() error {
|
func (sub *Submodule) Reload(force bool) error {
|
||||||
runtime.LockOSThread()
|
runtime.LockOSThread()
|
||||||
defer runtime.UnlockOSThread()
|
defer runtime.UnlockOSThread()
|
||||||
|
|
||||||
ret := C.git_submodule_reload(sub.ptr)
|
ret := C.git_submodule_reload(sub.ptr, cbool(force))
|
||||||
if ret < 0 {
|
if ret < 0 {
|
||||||
return MakeGitError(ret)
|
return MakeGitError(ret)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (repo *Repository) ReloadAllSubmodules() error {
|
func (repo *Repository) ReloadAllSubmodules(force bool) error {
|
||||||
runtime.LockOSThread()
|
runtime.LockOSThread()
|
||||||
defer runtime.UnlockOSThread()
|
defer runtime.UnlockOSThread()
|
||||||
|
|
||||||
ret := C.git_submodule_reload_all(repo.ptr)
|
ret := C.git_submodule_reload_all(repo.ptr, cbool(force))
|
||||||
if ret < 0 {
|
if ret < 0 {
|
||||||
return MakeGitError(ret)
|
return MakeGitError(ret)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue