summaryrefslogtreecommitdiff
path: root/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'status.go')
-rw-r--r--status.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/status.go b/status.go
index e22f533..2baf13d 100644
--- a/status.go
+++ b/status.go
@@ -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
+}