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

Function DefaultBlameOptions

blame.go:21–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19}
20
21func DefaultBlameOptions() (BlameOptions, error) {
22 runtime.LockOSThread()
23 defer runtime.UnlockOSThread()
24
25 opts := C.git_blame_options{}
26 ecode := C.git_blame_options_init(&opts, C.GIT_BLAME_OPTIONS_VERSION)
27 if ecode < 0 {
28 return BlameOptions{}, MakeGitError(ecode)
29 }
30
31 return BlameOptions{
32 Flags: BlameOptionsFlag(opts.flags),
33 MinMatchCharacters: uint16(opts.min_match_characters),
34 NewestCommit: newOidFromC(&opts.newest_commit),
35 OldestCommit: newOidFromC(&opts.oldest_commit),
36 MinLine: uint32(opts.min_line),
37 MaxLine: uint32(opts.max_line),
38 }, nil
39}
40
41type BlameOptionsFlag uint32
42

Callers

nothing calls this directly

Calls 3

MakeGitErrorFunction · 0.85
BlameOptionsFlagTypeAlias · 0.85
newOidFromCFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…