func (repo *Repository) Detached() (bool, error) { detached := C.git_repository_head_detached(repo.git_repository) if detached == c_TRUE { return true, nil } else if detached == c_FALSE { return false, nil } return false, gitError() }
func (v *Repository) IsHeadDetached() (bool, error) { runtime.LockOSThread() defer runtime.UnlockOSThread() ret := C.git_repository_head_detached(v.ptr) if ret < 0 { return false, MakeGitError(ret) } return ret != 0, nil }