Add git_patch_num_hunks, git_patch_get_hunk, git_patch_get_line_in_hunk #944
2
patch.go
2
patch.go
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue