Add Repository.IsEmpty
This commit is contained in:
parent
b99dbb1361
commit
726331dfde
|
@ -279,6 +279,18 @@ func (v *Repository) IsHeadUnborn() (bool, error) {
|
|||
return ret != 0, nil
|
||||
}
|
||||
|
||||
func (v *Repository) IsEmpty() (bool, error) {
|
||||
runtime.LockOSThread()
|
||||
defer runtime.UnlockOSThread()
|
||||
|
||||
ret := C.git_repository_is_empty(v.ptr)
|
||||
if ret < 0 {
|
||||
return false, MakeGitError(ret)
|
||||
}
|
||||
|
||||
return ret != 0, nil
|
||||
}
|
||||
|
||||
func (v *Repository) Walk() (*RevWalk, error) {
|
||||
|
||||
var walkPtr *C.git_revwalk
|
||||
|
|
Loading…
Reference in New Issue