MCPcopy Create free account
hub / github.com/libgit2/git2go / HunkByLine

Method HunkByLine

blame.go:110–117  ·  view source on GitHub ↗
(lineno int)

Source from the content-addressed store, hash-verified

108}
109
110func (blame *Blame) HunkByLine(lineno int) (BlameHunk, error) {
111 ptr := C.git_blame_get_hunk_byline(blame.ptr, C.size_t(lineno))
112 runtime.KeepAlive(blame)
113 if ptr == nil {
114 return BlameHunk{}, ErrInvalid
115 }
116 return blameHunkFromC(ptr), nil
117}
118
119func newBlameFromC(ptr *C.git_blame) *Blame {
120 if ptr == nil {

Callers 1

TestBlameFunction · 0.80

Calls 1

blameHunkFromCFunction · 0.85

Tested by 1

TestBlameFunction · 0.64