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

Function diffHunkFromC

diff.go:106–114  ·  view source on GitHub ↗
(hunk *C.git_diff_hunk)

Source from the content-addressed store, hash-verified

104}
105
106func diffHunkFromC(hunk *C.git_diff_hunk) DiffHunk {
107 return DiffHunk{
108 OldStart: int(hunk.old_start),
109 OldLines: int(hunk.old_lines),
110 NewStart: int(hunk.new_start),
111 NewLines: int(hunk.new_lines),
112 Header: C.GoStringN(&hunk.header[0], C.int(hunk.header_len)),
113 }
114}
115
116type DiffLine struct {
117 Origin DiffLineType

Callers 2

diffForEachHunkCallbackFunction · 0.85
hunkApplyCallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…