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

Method Delta

diff.go:150–158  ·  view source on GitHub ↗
(index int)

Source from the content-addressed store, hash-verified

148}
149
150func (diff *Diff) Delta(index int) (DiffDelta, error) {
151 if diff.ptr == nil {
152 return DiffDelta{}, ErrInvalid
153 }
154 ptr := C.git_diff_get_delta(diff.ptr, C.size_t(index))
155 ret := diffDeltaFromC(ptr)
156 runtime.KeepAlive(diff)
157 return ret, nil
158}
159
160// deprecated: You should use `Diff.Delta()` instead.
161func (diff *Diff) GetDelta(index int) (DiffDelta, error) {

Callers 1

GetDeltaMethod · 0.95

Calls 1

diffDeltaFromCFunction · 0.85

Tested by

no test coverage detected