()
| 19 | } |
| 20 | |
| 21 | func 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 | |
| 41 | type BlameOptionsFlag uint32 |
| 42 |
nothing calls this directly
no test coverage detected
searching dependent graphs…