add StatusList.EntryCount()

This commit is contained in:
Ben Navetta 2014-08-18 20:11:14 -04:00
parent 37ccc4c00d
commit 0513670745
1 changed files with 7 additions and 0 deletions

View File

@ -75,3 +75,10 @@ func (statusList *StatusList) ByIndex(index int) (StatusEntry, error) {
ptr := C.git_status_byindex(statusList.ptr, C.size_t(index))
return statusEntryFromC(ptr), nil
}
func (statusList *StatusList) EntryCount() (int, error) {
if statusList.ptr == nil {
return -1, ErrInvalid
}
return int(C.git_status_list_entrycount(statusList.ptr)), nil
}