More diff functionality #629

Merged
mbfr merged 24 commits from feature-diff-extra into master 2020-08-18 08:14:03 -05:00
1 changed files with 3 additions and 0 deletions
Showing only changes of commit adfb859419 - Show all commits

View File

@ -86,6 +86,9 @@ func (statusList *StatusList) ByIndex(index int) (StatusEntry, error) {
return StatusEntry{}, ErrInvalid return StatusEntry{}, ErrInvalid
} }
ptr := C.git_status_byindex(statusList.ptr, C.size_t(index)) ptr := C.git_status_byindex(statusList.ptr, C.size_t(index))
if ptr == nil {
return StatusEntry{}, MakeGitError(C.int(ErrNotFound))
}
entry := statusEntryFromC(ptr) entry := statusEntryFromC(ptr)
runtime.KeepAlive(statusList) runtime.KeepAlive(statusList)