Update master to latest libgit2 and build statically #362

Merged
carlosmn merged 34 commits from cmn/master-tip-static into master 2017-01-20 16:55:27 -06:00
1 changed files with 12 additions and 0 deletions
Showing only changes of commit 726331dfde - Show all commits

View File

@ -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