Add git_patch_num_hunks, git_patch_get_hunk, git_patch_get_line_in_hunk #944

Open
ribeiromiranda wants to merge 2 commits from galgotech/git_patch_hunk into main
1 changed files with 1 additions and 1 deletions
Showing only changes of commit f1ece8650b - Show all commits

View File

@ -61,7 +61,7 @@ func (patch *Patch) NumHunks() (int, error) {
if patch.ptr == nil { if patch.ptr == nil {
return -1, ErrInvalid return -1, ErrInvalid
} }
ret := int(C.git_patch_num_hunks()) ret := int(C.git_patch_num_hunks(patch.ptr))
runtime.KeepAlive(patch) runtime.KeepAlive(patch)
return ret, nil return ret, nil
} }