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

Method Stats

diff.go:283–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281}
282
283func (diff *Diff) Stats() (*DiffStats, error) {
284 stats := new(DiffStats)
285
286 runtime.LockOSThread()
287 defer runtime.UnlockOSThread()
288
289 ecode := C.git_diff_get_stats(&stats.ptr, diff.ptr)
290 runtime.KeepAlive(diff)
291 if ecode < 0 {
292 return nil, MakeGitError(ecode)
293 }
294 runtime.SetFinalizer(stats, (*DiffStats).Free)
295
296 return stats, nil
297}
298
299type diffForEachCallbackData struct {
300 fileCallback DiffForEachFileCallback

Callers 1

TestDiffTreeToTreeFunction · 0.80

Calls 1

MakeGitErrorFunction · 0.85

Tested by 1

TestDiffTreeToTreeFunction · 0.64